XSL choose several
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 5
- Joined: Thu Dec 20, 2018 1:27 pm
XSL choose several
I am currently stuck at a problem with xsl.
Example:
XML:
<Idoc>
- <invoice01>
- <asd>000010</asd>
- <jkl>12</jkl>
- </invoice01>
<Idoc>
The problem is that i have around 100 files with different information in <asd> and i want to differentiate by that value.
xsl:
<xsl:stylesheet>
<Order>
<xsl:for-each select="/Idoc/invoice01">
<xsl:if test="ASD=000010">
<cbc:Quantity><xsl:value-of select="/Idoc/invoice01[asd='000010']/jkl"/></cbc:Quantity>
A different xml file could be:
<Idoc>
- <invoice01>
- <asd>000090</asd>
- <jkl>12</jkl>
- </invoice01>
- <invoice02>
- <asd>000080</asd>
- <jkl>20</jkl>
- </invoice02>
<Idoc>
I am therefor looking for a way to separate the information, but also be able to apply several quantities if needed.
Example:
XML:
<Idoc>
- <invoice01>
- <asd>000010</asd>
- <jkl>12</jkl>
- </invoice01>
<Idoc>
The problem is that i have around 100 files with different information in <asd> and i want to differentiate by that value.
xsl:
<xsl:stylesheet>
<Order>
<xsl:for-each select="/Idoc/invoice01">
<xsl:if test="ASD=000010">
<cbc:Quantity><xsl:value-of select="/Idoc/invoice01[asd='000010']/jkl"/></cbc:Quantity>
A different xml file could be:
<Idoc>
- <invoice01>
- <asd>000090</asd>
- <jkl>12</jkl>
- </invoice01>
- <invoice02>
- <asd>000080</asd>
- <jkl>20</jkl>
- </invoice02>
<Idoc>
I am therefor looking for a way to separate the information, but also be able to apply several quantities if needed.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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