Path to XSL for bindXML


#1

Hi to all

I would like to be able to use an URL to the xsl to tranform my xml document rather than a relative path so that I can refer to it in several different apps deployed internally and externally to our organisation.

When I use the statement below:

pdf1.BindXML(theXML_Doc, “http://myServer/myDirectory/template/RID_Pdf.xsl”)

I get this error:
The ‘"’ character, hexadecimal value 0x22, cannot be included in a name. Line 963, position 38.

Whereas if I use this code (same xsl but in a file based location):

pdf1.BindXML(theXML_Doc, theAppPath & “documentation\RID_Pdf.xsl”)

It works fine.

Any ideas on what is going wrong?

An URL should be able to be used in this sort of way:

Dim theTransform As XslTransform = New XslTransform()
theTransform.Load(“http://myServer/myDirectory/template/ratelineChart.xsl”)
Dim theTransXML_Doc As New XmlDocument()
theTransXML_Doc.Load(theTransform.Transform(theXML_Doc, Nothing))

assuming that standard MS methods are being used in the aspose.pdf code.

Any thoughts would be most appreciated

Best regards

GIS_Analyst


#2

Hi,

Thank you for considering Aspose.

Which version of Aspose.pdf do you use? I have tested it with the latest version and it works well.


#3

Hi Tommy

I am using version 2.2.0.0

Maybe the hotfixes will fix the problem. I assume that applying the latest hotfix will include all of the hotfixes to the last major release?

Thanks very much

Ralph Price


#4

Yes. Please try the latest hotfix. If it still won’t work, please let me know.


#5

Hi Tommy

I downloaded and installed the latest hotfix which did not fix it. After looking at various means to validate the xsl I discovered that there was an xpath expression that had double quotes in it, rather than single quotes.
The odd thing was that the xsl did not give an error when it was a local file referenced by either local file or url i.e.

’ theXSL_Path = “c:\inetpub\wwwroot\GVFull\documentation\RID_Pdf.xsl”

pdf1.BindXML(theXML_Doc, theXSL_Path)

OR

'theXSL_Path = “http://gis-flame/GVFull/documentation\RID_Pdf.xsl

pdf1.BindXML(theXML_Doc, theXSL_Path)

However when an identical file was on another webserver then the error occured i.e.

theXSL_Path = “http://cabmap/XML_Connect/template/RID_Pdf.xsl

pdf1.BindXML(theXML_Doc, theXSL_Path)


Anyway the error is now resolved so all is good. By the way Tommy I am now past the point of simply trying the component out and have purchased the product and am very happy.

Best regards

Ralph Price