shorten a XPATH expression (or-junction)
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 30
- Joined: Wed Feb 14, 2018 3:27 pm
shorten a XPATH expression (or-junction)
Post by mariomueller »
Hi all,
is there a way to write to expression
in a shorter way like e.g. (the following is not working, as also Z99 would be valid and I don't no why?)
Thanks
Regards
Mario
is there a way to write to expression
Code: Select all
<xsd:assert test="(G_SG8/G_SG10/S_CCI[D_7059='Z01']/D_4051='Z30') or (G_SG8/G_SG10/S_CCI[D_7059='Z01']/D_4051='Z31') " />
Code: Select all
<xsd:assert test="G_SG8/G_SG10/S_CCI[D_7059='Z01']/D_4051='Z30' or 'Z31' " />
Thanks
Regards
Mario
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: shorten a XPATH expression (or-junction)
Hi,
Try:
Regards,
Adrian
Try:
Code: Select all
<xsd:assert test="G_SG8/G_SG10/S_CCI[D_7059='Z01']/(D_4051=('Z30', 'Z31'))" />
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 30
- Joined: Wed Feb 14, 2018 3:27 pm
Re: shorten a XPATH expression (or-junction)
Post by mariomueller »
Hi Adrian,
thanks for your reply. Unfortunatelly this does not work
Regards
Mario
thanks for your reply. Unfortunatelly this does not work

Regards
Mario
-
- Posts: 30
- Joined: Wed Feb 14, 2018 3:27 pm
Re: shorten a XPATH expression (or-junction)
Post by mariomueller »
Hi adrian,
I found it. This works:
<xsd:assert test="G_SG8/G_SG10/S_CCI[D_7059='Z01']/D_4051=('Z30','Z31')"/>
Regards
Mario
I found it. This works:
<xsd:assert test="G_SG8/G_SG10/S_CCI[D_7059='Z01']/D_4051=('Z30','Z31')"/>
Regards
Mario
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