How do I display CommercialVehicleFlag?
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 62
- Joined: Thu Jun 26, 2014 9:00 pm
How do I display CommercialVehicleFlag?
I have modified this question by adding a more detailed xsl code showing two templates that I am using. CommercialVehicleFlag can be under Charge which is under Case or under Citation which is under Case.
I want to check for CommercialVehicleFlag in both places that is under /Integration/Case/Charge/Vehicle/VehicleLicensePlateNumber and /Integration/Citation/Vehicle/CommercialVehicleFlag in xml document.
Do I use for each statement if a if statement to check before selecting the value of?
My xsl is only working for VehicleLicensePlateNumber in this xpath
and failing this xpath
In my xsl I need to check for both paths. How do I do this?
xml document with CommercialVehicleFlag under Charge
CODE --> xml
xml document with CommercialVehicleFlag under Citation
my xsl code
I want to check for CommercialVehicleFlag in both places that is under /Integration/Case/Charge/Vehicle/VehicleLicensePlateNumber and /Integration/Citation/Vehicle/CommercialVehicleFlag in xml document.
Do I use for each statement if a if statement to check before selecting the value of?
My xsl is only working for VehicleLicensePlateNumber in this xpath
Code: Select all
/Integration/Case/Charge/Vehicle/VehicleLicensePlateNumber
Code: Select all
/Integration/Citation/Vehicle/CommercialVehicleFlag
xml document with CommercialVehicleFlag under Charge
CODE --> xml
Code: Select all
<Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="http://tsgweb.com" xmlns:IXML="http://tsgweb.com" xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" PackageID="DL Notice to DVS" MessageID="67084884" xmlns="">
<Case Op="E" InternalID="1617090736" ID="12125870" xmlns:user="http://tylertechnologies.com">
<CaseNumber>55</CaseNumber>
<Charge ID="10906336" PartyID="16770378" InternalChargeID="1616713996" InternalPartyID="1614673416" xmlns:reslib="urn:reslib">
<ChargeOffenseDate>05/28/2015</ChargeOffenseDate>
<Vehicle>
<VehicleLicensePlateState>MM</VehicleLicensePlateState>
<VehicleLicensePlateNumber>ASD123</VehicleLicensePlateNumber>
<VehicleMake Word="JEEP">Jeep</VehicleMake>
<CommercialVehicleFlag>false</CommercialVehicleFlag>
<HazardousVehicleFlag>false</HazardousVehicleFlag>
</Vehicle>
</Charge>
</Case>
</Integration>
xml document with CommercialVehicleFlag under Citation
Code: Select all
<Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="http://tsgweb.com" xmlns:IXML="http://tsgweb.com" xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" PackageID="DL Notice to DVS" MessageID="67086833" xmlns="">
<Citation ID="5380737" xmlns:user="http://tylertechnologies.com">
<CitationNumber>33</CitationNumber>
<TicketDate>12/25/2014</TicketDate>
<Vehicle>
<CommercialVehicleFlag>false</CommercialVehicleFlag>
<HazardousVehicleFlag>false</HazardousVehicleFlag>
</Vehicle>
</Citation>
</Integration>
Code: Select all
<xsl:value-of select="../CommercialVehicleFlag"/>
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