Re: Howto generate a list xpath queries that are used
Hello Joren I see what you mean, but I'm afraid I won't be able to help much: maybe I'm wrong, but as far as I know, this won't be possible in XSLT. 1. checking if an attribute value is an XPath query or not? Suppose you have an attribute value "bla", is that an XPath query? As a matter of fact it is, or it could be (match an element named "bla"). (I know you know this already, but I'm only contemplating the problem in case someone else would have a better idea) The closest you can get (I think) is what you have so far: presuming that select and test attributes hold an XPath expression, and others don't. After all, if you have select="bla" it must be XPath, and if you have mode="bla" you can be pretty sure it's only a name. As you said, it's allowed to use XPath with other attributes, but the only examples of this I can think of are 'use' in xsl:key, and 'count', 'value' and 'from' in xsl:number. So, you could add these to your test. 2. generating unique IDs for linking <xsl:apply-templates> with their corresponding <xsl:template> is something I wanted to add to my own xdoc stylesheet, too, but I never found a working solution for that. As you pointed out, the 'select' attribute of apply-templates doesn't always literally match the template's 'match' attribute, so you can't build a link string by just using their values. Best regards Anton Triest Sunday, August 22, 2004 8:01 PM, Joren Crauwels wrote: > Hi, > > i know i can check on all attributes, but then i still dont know wheter or > not it's an xpath query or not. The most queries are used with the select > and test attribute, but its also allowed to used xpath with other > attributes. So my biggest problem is knowing wheter or not its an xpath > query or not. Maybe if it makes some things clear for u, this is my current > output and xsl file: > http://lumumba.luc.ac.be/~jorencrauwels/jorentms/xslt2html/ > Maybe u can also give some advice about the ID i could use after the # in my > hrefs, because its not unique at the moment. For example with the list of > used templates within a template, i also link to the detailed information > for each template, but when i use match="./template" in stead of > match="template", the link isnt correct anymore. I hope this make some > sense... > > Bye, > joren
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