How do I check State Code if it has four characters and then
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 62
- Joined: Thu Jun 26, 2014 9:00 pm
How do I check State Code if it has four characters and then
What I am trying to do is check in the XML document for the element
<DriversLicenseState Word="CDON">Ontario</DriversLicenseState>.
If State word found has four characters and begins with ‘CD’ only display the last two characters. In this case (example) I would display <nc:JurisdictionCanadianProvinceCode>ON</nc:JurisdictionCanadianProvinceCode> otherwise display the State/@Word
I am not sure how to add logic to do this.
XML document
<DriversLicenseState Word="CDON">Ontario</DriversLicenseState>.
If State word found has four characters and begins with ‘CD’ only display the last two characters. In this case (example) I would display <nc:JurisdictionCanadianProvinceCode>ON</nc:JurisdictionCanadianProvinceCode> otherwise display the State/@Word
I am not sure how to add logic to do this.
XML document
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="IXML Case Notification Test" MessageID="67077793" xmlns="">
<Party ID="8265760" InternalPartyID="392728694">
<PartyName ID="4614549" Current="true" InternalNameID="1612416995">
<NameType>Standard</NameType>
<NameFirst>Ismael</NameFirst>
<NameLast>Montemayor-Lira</NameLast>
<FormattedName>Montemayor-Lira, Ismael</FormattedName>
</PartyName>
<DriversLicense Current="true">
<DriversLicenseNumber>321456782541A</DriversLicenseNumber>
<DriversLicenseState Word="CDON">Ontario</DriversLicenseState>
</DriversLicense>
</Integration>
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