[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Compact XPath syntax
> //c seems to be what you are looking for. > > In XSLT2, with a schema aware processor, in some limited > situations, you may be able to use knowledge of a schema to > make such optimsations but in general this is not possible. > Saxon-SA will rewrite //c as /a/b/c provided that the type of the context node is statically known. It is generally good practice to declare type information when writing schema-aware stylesheets, for example <xsl:template match="document-node(schema-element(fpml:FPML))"> <xsl:value-of select="//x"/> </xsl:template> The type information can be used both for optimization and for better error checking: with a complex schema like FPML, it's very useful to be able to abbreviate your path expressions (which can otherwise be immensely long) without incurring any performance penalty. 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
|