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

RE: Preserving space

Subject: RE: Preserving space
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 13 Feb 2008 10:07:19 -0000
RE:  Preserving space
I think you need to raise this on a list that's specific to xsltproc

(a) The input to document() is supposed to be a URI. URIs never contain
spaces. If you supply something that isn't a valid URI, XSLT 1.0 is pretty
vague about what's supposed to happen. You could try escaping it as %20

(b) If document() can't find anything with the supplied URI, then the spec
says it has the option of reporting an error or returning nothing. Some
processors have switches that allow you to configure this.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Mathieu Malaterre [mailto:mathieu.malaterre@xxxxxxxxx] 
> Sent: 13 February 2008 09:56
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Preserving space
> 
> Hi there,
> 
>   The following code is loosing the space when calling the 'document'
> function. The weirdest part is that I do not even get an error...
> 
> xml:
>   <file>toshiba/MIIXR00010EAB (V3.10).xml</file>
> 
> xsl:
>   <xsl:template match="file">
>     <xsl:apply-templates select="document(.)"/>
>   </xsl:template>
> 
> What do I need to do to:
> 1. Preserve the space
> 2. Make sure an error is raised if a document cannot be found.
> 
> Ref: Debian/Linux + xsltproc
> 
> $ xsltproc --version
> Using libxml 20627, libxslt 10119 and libexslt 813 xsltproc 
> was compiled against libxml 20627, libxslt 10119 and libexslt 
> 813 libxslt 10119 was compiled against libxml 20627 libexslt 
> 813 was compiled against libxml 20627
> 
> 
> Thanks
> --
> Mathieu

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.