[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xpath analyser in XSL-T 1 or 2
> This sounds like a promising approach. When I first saw the address I > thought it would have something to do with monetDB xquery, MONET was a EU funded research project for Mathematics ON the WEB, the project's gone but the web server is still there and NAG was kind enough to let me use it. > Do an Xquery with Xpath X, pass Xpath X to the Xq2xml get back xml, Yes, that part isn't really me/xq2xml it's a built in feature (which was added at my request) of the xquery/xpath parsers provided by the working groups (Scott Boag, mainly) http://www.w3.org/2005/qt-applets/xqueryApplet.html from there on. you may not want any of the xq2xml code at all, but just use MY stylesheets as an example, for example http://monet.nag.co.uk/xq2xml//index.html#s6 is a stylesheet that removes any references to optional (in xquery) axes such as preceding::, replacing $y/preceding::*[2]/string(@i) by $y/ (let $here := . return reverse(root()/descendant::*[. << $here][not(descendant::node()[. is $here])])) [2]/string(@i) which is essentially just a single template <xsl:template match="StepExpr[ReverseAxis/data='preceding']"> (let $here := . return reverse(root()/descendant:: <xsl:apply-templates select="NodeTest"/> [. << $here][not(descendant::node()[. is $here])])) <xsl:apply-templates select="* except (ReverseAxis|NodeTest)"/> </xsl:template> David
|
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
|