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

entity expansion in stylesheets

Subject: entity expansion in stylesheets
From: "Ben Jung" <benjamin.jung@xxxxxxxxx>
Date: Tue, 9 May 2000 16:44:43 +0100
xsl entity expansion
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


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.