xsl-list
[Top] [All Lists]

from start tag A to end tag B

2005-01-31 07:03:17
Hello,

I have the following input xml

<root>
        <p class="foo">
        ...
        </p>

        <tag1/>
        ...
        <tagN/>
        
        <p class="foo">
        ...
        </p>
        ...
</root>

I want to put all elements between <p class="foo"> start tags into a new
element called textItem. E.g.:

<root>
        <textItem>
                <p class="foo">
                ...
                </p>

                <tag1/>
                ...
                <tagN/>
        </textItem>
        <textItem>
                <p class="foo">
                ...
                </p>
                ...
        </textItem>
</root>

As XSL does not work on a tag basis (like SAX getStartTag()) nor line
basis I am not sure how to implment that.I am not even sure if there is
a chance to do that in XSL. Can you help?

Thanks in advance,

Robert

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>