[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE : Re: RE : Text or tags choi ce wit
Hi John, > Question: does XPath/XSLT 2.0 grok substitution groups, such that > you *could* write simply "//time" in a stylesheet and match either > time-simple or time-complex elements? Yes, or almost, as long as you have a schema-aware processor and you've imported the relevant schema. If you have a schema that contains: <xs:element name="time" /> <xs:element name="time-simple" substitution-group="time" /> <xs:element name="time-complex" substitution-group="time" /> then you can match <time>, <time-simple> and <time-complex> elements with the node tests "element(time)" or "element(time,*)". So you can have a template like: <xsl:template match="element(time)">...</xsl:template> to match all three elements. However, a template like: <xsl:template match="time">...</xsl:template> will still only match an element that is actually called "time". Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
|
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
|