|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Has anyone got examples of these validating XSLTs? Was:
> Surely XML Schema is more suitable for those who are disatisfied with DTDs? `more suitable' depends on what constraints your are trying to enforce. The types of constraint that you can express using xpath are different. For example in MathML a cn element (number) normally just takes character data (as a real number) but if the the type attribute is used with value complex-cartesian then the cn element has to have exactly one <sep/> child, with the real and imaginary parts being represented by the characters either side of the <sep/>. You can't express this in a DTD (and I don't think you can in a schema either) but <xsl:template match="m:cn[@type='complex-cartesian' and not(count(m:sep)=1)]"> <xsl:message>don't do this</xsl:message> </xsl:template> <xsl:template match="m:cn[m:sep and not(@type)]"> <xsl:message>don't do this either</xsl:message> </xsl:template> David 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








