How to select all tags until a certain tag
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 1
- Joined: Wed Apr 13, 2011 11:10 am
How to select all tags until a certain tag
Hi,
I have the following XML:
I need to have the following output:
So all H and P tag belong together until another H tag is received.
Consequentiality all H tag belong together and all P tag should be grouped together.
Until now I didn't find a correct way to handle it yet.
Anybody having an idea on how to handle this in xslt?
regards,
I have the following XML:
Code: Select all
<root>
<H>1-A</H>
<H>1-B</H>
<P></P>
<P></P>
<P></P>
<H>2-A</H>
<P></P>
<P></P>
<H>3-A</H>
<H>3-B</H>
<H>3-C</H>
<P></P>
</root>
Code: Select all
<R>
<RECORD>
<SOMETAG>
<H>1-A</H>
<H>1-B</H>
</SOMETAG>
<ANOTHER>
<P></P>
<P></P>
</ANOTHER>
</RECORD>
<RECORD>
<SOMETAG>
<H>2-A</H>
</SOMETAG>
<ANOTHER>
<P></P>
<P></P>
<P></P>
</ANOTHER>
</RECORD>
<RECORD>
<SOMETAG>
<H>3-A</H>
<H>3-B</H>
<H>3-C</H>
</SOMETAG>
<SOMETAG1>
<P></P>
</SOMETAG1>
</RECORD>
</R>
Consequentiality all H tag belong together and all P tag should be grouped together.
Until now I didn't find a correct way to handle it yet.
Anybody having an idea on how to handle this in xslt?
regards,
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: How to select all tags until a certain tag
Post by sorin_ristache »
Hello,
Maybe the experts from the xsl-list mailing list can provide an XSLT solution for your processing.
Regards,
Sorin
Maybe the experts from the xsl-list mailing list can provide an XSLT solution for your processing.
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service