|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: doc() concat expression and 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
', thus:
select='doc(concat("http://localhost:8080/exist/servlet/db/mods?_query=",
"/mods:modsCollection/mods:mods[@ID='", ., "']"))'/>
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








