xslt - find if child element exist by variable -


i have long list query statement check if said tag exist. if does. copy-of value. if not else it. trying

 <xsl:choose>         <xsl:when test="$test1/thing/row/name() = $tagname">         <xsl:copy-of select = "$test1/thing/row/name()"/>         </xsl:when>     <xsl:otherwise>     <!-- -->     </xsl:otherwise> </xsl:choose> 

and not working! ideas?

try:

<xsl:when test="$test1/thing/row/*[name() = $tagname]"> 

note pretty guess. without context, that's can get.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -