Same name sibling elements
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 8
- Joined: Tue Feb 15, 2005 12:00 am
Same name sibling elements
How can i write a single XSL that will get cpad from under cpadPtAddr and cpad from under cpadPtAddrFlr and output it top a pipe delimited text file.
IO have two xsls that can do this seperately but match template works only for either cpadptAddr or cpadPtAddrFLr
IO have two xsls that can do this seperately but match template works only for either cpadptAddr or cpadPtAddrFLr
Code: Select all
<?xml version="1.0"?>
<te>
<add>
<alp>45</alp>
<aun>01</aun>
<seq>401C</seq>
<apr/>
<asu/>
<alo>6802</alo>
<ahi>6811</ahi>
<loF>1</loF>
<hiF>15</hiF>
<asn>RUSTICA</asn>
<ri>1</ri>
<con>0</con>
<cn>65</cn>
<city>
<cinm>WESTMINSTER</cinm>
</city>
<zip>
<code>21158</code>
<cmt>2</cmt>
</zip>
<urb>
<unm/>
</urb>
<st>
<stnm>MD</stnm>
</st>
<typ>CIR</typ>
<rla>0</rla>
<cds>0</cds>
<rlex>
<ri>2</ri>
<stnm>6804</stnm>
</rlex>
<cpadPtAddr>
<cpadStrNum>6804</cpadStrNum>
<CPaD>
<cpadMsgID>4</cpadMsgID>
<cpadMsgType>20</cpadMsgType>
<cpadExtMsg>ENTERTHECODE</cpadExtMsg>
<cpadNAP>100</cpadNAP>
<cpadDIADDecides>0</cpadDIADDecides>
<cpadDays>0111111</cpadDays>
<cpadStartDate/>
<cpadEndDate/>
</CPaD>
</cpadPtAddr>
<cpadPtAddrFlr>
<cpadStrNum>6804</cpadStrNum>
<cpadFlr>15</cpadFlr>
<CPaD>
<cpadMsgID>15</cpadMsgID>
<cpadMsgType>20</cpadMsgType>
<cpadExtMsg>BRING BACK</cpadExtMsg>
<cpadNAP>100</cpadNAP>
<cpadDIADDecides>0</cpadDIADDecides>
<cpadDays>0111111</cpadDays>
<cpadStartDate/>
<cpadEndDate/>
</CPaD>
</cpadPtAddrFlr>
</add>
</te>
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
It is not clear what output you are expecting nor what is exactly the problem you encountered. You can match on both of cpadPtAddr and cpadPtAddrFlr elements if you use something like match="cpadPtAddr | cpadPtAddrFlr" in an xsl template.
If that does not help please provide more details like current stylesheet, expeced output.
Best Regards,
George
It is not clear what output you are expecting nor what is exactly the problem you encountered. You can match on both of cpadPtAddr and cpadPtAddrFlr elements if you use something like match="cpadPtAddr | cpadPtAddrFlr" in an xsl template.
If that does not help please provide more details like current stylesheet, expeced output.
Best Regards,
George
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