<xsl:variable name= "xpath">
<xsl:for-each select="ancesto r::*">
<xsl:value-of select="name()"/><xsl:text>-</xsl:text>
</xsl:for-each>
<xsl:value-of select="name()"/>
</xsl:variable>
Hi ,
The above code...
User Profile
Collapse
-
Concating string to Xpath Exprn.
-
Cool!! That worked Thanks!! -
nmae() or local-name() would only return me th ename of the current node.But i'm trying to find out the Xpath Expression ,which would return the ancestors names also
I need the name of current node plus its ancestors.
ex: root/toplevelnode1/node2/ current node
So i tried :
<xsl:variable name= "xpath" select ="name(ances tor-or-self::[name()])"/>
I...Leave a comment:
-
Find Xpath Expn of current node using ancestor-or-self
I'm trying to Xpath EXprn for a current node(name unknown).I tried using the below syntax,but it fails .Pls help.
<xsl:variable name= "xpath" select ="name(ances tor-or-self::(.))"/> -
-
Hi jkmyoung,
I tried the above code ,but its not acceptiong the syntax *[not *] says unexpected Token.
How can I test if the current node has child elements on not?When i go into the forms level I need to display the form Name as the Header (I can easily do this) but the next step is to find out if the current element/node(inside forms) has children or not,if it has then I need to display them diffrently than the elements directly...Leave a comment:
-
Hi jkmyoung,
Thank you ver much for u'r response.I totally understand your logic.But my problem is I don't know the childform names ...so I cannot use contains to compare if the local node contains "childForm" .
In my scenario under root ,there are n (approx 100)number of forms and each form has 0 or more child forms along with its own elements.... So using the XPath say //forms/Form1/childForm1 is ruled out b'cos...Leave a comment:
-
Convert dynamic XML using XSLT into HTML.
Hello Experts,
I'm trying to convert an dynamic XML doc into HTML using XSLT.
In the example I have shown one form(form1)...B ut there could be multiple forms....names are unknown and each one could have o or more childforms .I want to display form1 as <th> element followed by attributes,then display Childform1 as header(if there is a child form) .See the XSl below.
Is there a way to check if form1 has childforms...so...
No activity results to display
Show More
Leave a comment: