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

RE: doc() concat expression and whitespace error

Subject: RE: doc() concat expression and whitespace error
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 16 Nov 2004 02:40:27 -0000
xml whitespace error
> select='doc(concat("http://localhost:8080/exist/servlet/db/mods? 
> _query=", "/mods:modsCollection/mods:mods[@ID='", ., "']"))'/>
> 
> However, when I run it from Saxon, I get this error:
> 
> 	  Error reported by XML parser: Whitespace required 
> before attributes.

When Saxon prefixes a message with "Error reported by XML parser" it means
that the error is at the XML level rather than the XSLT level - the
stylesheet is not well-formed XML. 

Your attribute starts with {select='} so it ends with the next {'} which is
the one in {@ID='}, which is not followed by a space. 

If you need to use ' within an attribute delimited by ', you can write it as
&apos;, thus:

select='doc(concat("http://localhost:8080/exist/servlet/db/mods?_query=",
"/mods:modsCollection/mods:mods[@ID=&apos;", ., "&apos;]"))'/>

But since the apostrophe is actually a character appearing in a URI, it
might be even better to escape it as %H27. Square brackets in a URI should
also probably be %HH-escaped.

Michael Kay

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.