[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: anyURI problem

Subject: Re: anyURI problem
From: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@xxxxxxxxx>
Date: Fri, 26 Aug 2011 10:48:29 +0200
Re:  anyURI problem
I can only say: works for me. I tried it on the Windows 7 cmd shell (with disgust):

java -cp c:/Programme/saxon/saxon9pe.jar net.sf.saxon.Transform -xsl:test.xsl -it:test

test.xsl looks like this:

-----------------------------
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="2.0"
  >

<xsl:template name="test">
<xsl:result-document href="file:///c:/temp/{encode-for-uri('[Content_Types].xml')}">
<test/>
</xsl:result-document>
</xsl:template>


</xsl:stylesheet>
-----------------------------

> dir \temp
2011-08-26  10:44    <DIR>          .
2011-08-26  10:44    <DIR>          ..
2011-08-26  10:44                45 [Content_Types].xml

>type \temp\*xml
\temp\[Content_Types].xml

<?xml version="1.0" encoding="UTF-8"?><test/>

Gerrit

On 2011-08-26 10:33, Jan Pour wrote:
Hi,

I tried both ways of how to cope with [Content_Types].xml
file in xsl:result-document href attribute:

Try using the iri-to-uri() function to turn this into a valid URI.

Saxon is fussier than some other products about insisting that URIs are
valid.

Michael Kay
Saxonica

That didnt work for me, but
href="{encode-for-uri('[Content_Types].xml')}"
did.

Or verbose
href="%5bContent_Types%5d.xml"

Gerrit

in Saxon 8 I was able to generate such file, but with versions 9.* I was not successful. With encode-for-uri() function 0-length file was generated with following error message:

java.net.URISyntaxException: Illegal character in path at index 21:
file:///C:/xslt/test/[Content_Types].xml

I tried Saxon versions: 9, 9.1 and 9.3he
Is there any other solution?

Thanks,
Jan


-- Gerrit Imsieke Geschdftsf|hrer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsieke@xxxxxxxxx, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschdftsf|hrer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vvckler

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.