Subject: Re: [xsl] Break Point in XML document: XPATH?? From: Niko Matsakis <niko@xxxxxxxxxxxxx> Date: Mon, 06 Jan 2003 14:43:33 -0500 |
<!-- create a variable with the index of the word break --> <xsl:variable name="break-pos"> <xsl:for-each select="following-sibling::elem2[contains (., "break")]"> <xsl:value-of select="position()"/> </xsl:for-each> </xsl:variable>
Niko Matsakis DataPower technology
Hi all,
I had earlier emailed regarding a break point in the an xml document. I need to transform the following document into another Xml document such that any tag below "break" should not be displayed.
The XSLT transformation is such that I am having to do this from the
<xsl:template match= "elem1"> block. So my context or current node is <elem1>. How do I do it from here. I am having difficulty in writing the proper XPath exressions for this. Any help is greatly appreciated.
Thanks
Chandra
<root> <elem1> data1 </elem1>
<elem2> <selem2> data2 </selem2> </elem2>
<!---Below this all should be removed except for root tag--> <elem2> <selem2> <ssubelem2> <sssubelem2 attr="break">break </sssubelem2> </ssubelem2> </selem2> </elem2>
<elem2> <selem2> data2 </selem2> </elem2>
<elem2> <selem2> data2 </selem2> </elem2>
</root>
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Break Point in XML document: , Chandra - | Thread | [xsl] sum() with selective attribut, Lee, Insoo |
Re: [xsl] FW: match="/", Joerg Heinicke | Date | Re: [xsl] 'Problems getting '&' out, Mike Brown |
Month |