[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Howto generate a list xpath queries that are used
On Sun, 22 Aug 2004 22:28:37 +0200, Joren Crauwels <joren.crauwels@xxxxxxxxxxxxxxx> wrote: > Hi, > > ok, this is the answer i came up with so far, it filters out strings and > also checks other attributes besides slect and test (i assume one you have > to use {function()} when u use it in other attributes then select or test) > If someone has a better idea, or a better solution, please let me know. U > are always welcome to give examples of xpath-queries that wil be left out by > my function. This is the function: > > <xsl:template name="generateUsedXpathQueries"> > <xsl:variable name="bla1" select="'joren'"/> > <xsl:for-each select="@*"> > <xsl:choose> > <xsl:when test="name() = 'select'"> > <xsl:variable name="quoteje">'</xsl:variable> > <xsl:if test="not(starts-with(normalize-space(.), > $quoteje)) and not(ends-with(normalize-space(.),$quoteje))"> > <li><xsl:value-of select="."/></li> > </xsl:if> > </xsl:when> Joren, This doesnt appear to address the following case : <xsl:variable name="someVar" select="concat('some string',//an/xpath/expression)" /> And of course, in place of the "concat" you can have other functions too. For example, substring-before / substring-after etc. Regards, Kenneth
|
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
|