I need help with this XML script
Questions about XML that are not covered by the other forums should go here.
I need help with this XML script
I am trying to modify the following conditional statement from an XML report file:
<FOR each = "ReportTender">
<IF>
<CONDITION> Report.Tender.TenderType = 1</CONDITION>
<THEN>
<ROW> Report.Tender.Description "|"
Report.Tender.ShiftTotal "|(bank deposit)"
</ROW>
</THEN>
<ELSE>
<ROW> Report.Tender.Description "|"
Report.Tender.ShiftTotal "|"
</ROW>
</ELSE>
</IF>
</FOR>
basically what the statement is supposed to say is that for 'reporttender', if the tendertype is equal to 1, then the a row should created that shows the tender.description, followed by the tender.shifttotal, following by the words 'bank deposit' in parentheses. otherwise, if the tendertype is not equal to 1, then a row should be created that shows the tender.description, followed by the tender.shifttotal
first of all, is my syntax correct in the above statement? if not what would need to be changed?
secondly, how can i modify the first part of the condition to check for tenders where the tendertype is equal to either 1 or 2, rather than just 1? the line of code I'm referring to is:
<CONDITION> Report.Tender.TenderType = 1</CONDITION>
How can I change this to test to see if the tendertype is EITHER 1 or 2?
thank you,
kevin
<FOR each = "ReportTender">
<IF>
<CONDITION> Report.Tender.TenderType = 1</CONDITION>
<THEN>
<ROW> Report.Tender.Description "|"
Report.Tender.ShiftTotal "|(bank deposit)"
</ROW>
</THEN>
<ELSE>
<ROW> Report.Tender.Description "|"
Report.Tender.ShiftTotal "|"
</ROW>
</ELSE>
</IF>
</FOR>
basically what the statement is supposed to say is that for 'reporttender', if the tendertype is equal to 1, then the a row should created that shows the tender.description, followed by the tender.shifttotal, following by the words 'bank deposit' in parentheses. otherwise, if the tendertype is not equal to 1, then a row should be created that shows the tender.description, followed by the tender.shifttotal
first of all, is my syntax correct in the above statement? if not what would need to be changed?
secondly, how can i modify the first part of the condition to check for tenders where the tendertype is equal to either 1 or 2, rather than just 1? the line of code I'm referring to is:
<CONDITION> Report.Tender.TenderType = 1</CONDITION>
How can I change this to test to see if the tendertype is EITHER 1 or 2?
thank you,
kevin
Return to “General XML Questions”
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