Subject: Entities as String
Posted By: muki Post Date: 11/11/2005 2:18:00 AM
How come this replies an error when process?
<xsl:variable name="entities" as="xs:string*" select="('&aeiubareiubar;','&aneiubareiubar;','&areiubareiubar;')"/>
As you can see, the variable is an array that needs to have values with entities but still the processor parse these strings and reply an error that it should be declared. Can I used these strings as plainly strings and not be interpreted by the processor as entities?
Thanks.

Reply By: mhkay Reply Date: 11/11/2005 8:16:19 AM
A stylesheet is an XML document and must be well-formed XML. That means that an ampersand must be part of a valid entity reference. If you want to use an ampersand in any other context, it must be written as &amp;

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply By: muki Reply Date: 11/12/2005 12:25:19 AM
I see... So the result of it would be &aeiubareiubar; for this example. But it does not. I used a character map for $amp;amp but still no luck. Thanks.

Reply By: mhkay Reply Date: 11/12/2005 11:15:01 AM
No, the only possible result for this example is an error,because the stylesheet is not well-formed XML.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Go to topic 36505

Return to index page 437
Return to index page 436
Return to index page 435
Return to index page 434
Return to index page 433
Return to index page 432
Return to index page 431
Return to index page 430
Return to index page 429
Return to index page 428