|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSLT 2.0 or XSLT 1.0 -- which is more elegant? (Wa
> What is really not elegant at all in XSLT 2.0 is the impossibility to
> define user data types inline in a stylesheet
But you can!
<xsl:stylesheet ...
<xsl:import-schema namespace="http://localhost/">
<xs:schema targetNamespace="http://localhost">
<xs:simpleType name="hatSize">
<xs:restriction base="xs:unsignedInteger">
<xs:maxInclusive value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
</xsl:import-schema>
<xsl:function name="my:measurements" as="my:hatSize">
...
</xsl:function>
</xsl:stylesheet>
Michael Kay
http://www.saxonica.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
|

Cart








