|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] entity expansion in stylesheets
Hi! Using stylesheet transformations, I have difficulties to extracting an entity expansion from an XML document. I declared the entity (in the XML as well as the XSL document) and the attribute type as 'entity' (in the XML document). I tried MSIE5 as well as xt. but couldn't get any reasonable result. I hope you can help me here. For more clarification, let's assume the following two files (XML and XSL): ------------------------------------------------------------ <?xml version='1.0'?> <!DOCTYPE person [ <!ENTITY m "male"> <!ENTITY f "female"> <!ELEMENT person (name, age)> <!ATTLIST person sex ENTITY #REQUIRED> <!ELEMENT name (#PCDATA)> <!ELEMENT age (#PCDATA)> ]> <person sex='m'> <name>Michael</name> <age>44</age> </person> ------------------------------------------------------------ <?xml version='1.0'?> <!DOCTYPE stylesheet [ <!ENTITY m "male"> <!ENTITY f "female"> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match='//person'> <xsl:value-of select='@sex'/> </xsl:template> </xsl:stylesheet> ------------------------------------------------------------ The expected output is 'male' (the expanded entity), but unfortunatly, I always get 'm' (the entity's name). Any suggestions/comments what I am doing wrong here? Thanks for your time, Ben XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








