Compare map and topic values
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 160
- Joined: Mon Nov 24, 2014 1:49 pm
- Location: Greven/Germany
Compare map and topic values
Hi,
I have a DITA Map with a topic reference, that has a filter attribute, for example @foo:
The topic has a <data> element, named foo with a value, that must be equal to the filter attribute.
Is it possible to compare both values with <oXygen/>, preferably with Schematron and a DITA Map validation scenario and a DITA Topic validation scenario
Greetings,
Stefan
I have a DITA Map with a topic reference, that has a filter attribute, for example @foo:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map id="map">
<title>DITA Topic Map</title>
<topicref href="topic.dita" foo="bar"/>
</map>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic">
<title>Topic</title>
<prolog>
<metadata>
<data name="foo" value="no-bar"/>
</metadata>
</prolog>
</topic>

Greetings,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Compare map and topic values
Hi Stefan,
Possibly in the Schematron used to validate the topic you could use the document() function to load the DITA Map and look inside it.
Other than this, I'm not sure how this could be done...
Regards,
Radu
Possibly in the Schematron used to validate the topic you could use the document() function to load the DITA Map and look inside it.
Other than this, I'm not sure how this could be done...
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 160
- Joined: Mon Nov 24, 2014 1:49 pm
- Location: Greven/Germany
Re: Compare map and topic values
Hi Radu,
alright, thanks. So, there is no option to get the DITA Map that is opened in the DITA Maps Manager?
Greetings,
Stefan
alright, thanks. So, there is no option to get the DITA Map that is opened in the DITA Maps Manager?
Greetings,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Compare map and topic values
Hi Stefan,
We have some static Java API to access the URL of the current opened DITA Map.
So in the Schematron you could define a prefix for the Java extension:
and then use it like:
but loading the main DITA Map using the document() function and parsing it each time the user types something in a topic (and automatic validation is triggered) seems a bit too much. You would need some kind of caching and I'm not sure how you could do this only with Schematron.
We have Java API which would allow you to add your own Java-based validation stage, this would possibly allow you to cache the information stored in the DITA Map instead of parsing the DITA Map each time.
Regards,
Radu
We have some static Java API to access the URL of the current opened DITA Map.
So in the Schematron you could define a prefix for the Java extension:
Code: Select all
<ns uri="java:ro.sync.ecss.dita.DITAAccess" prefix="java"/>
Code: Select all
<value-of select="java:getRootMapURL()"/>
We have Java API which would allow you to add your own Java-based validation stage, this would possibly allow you to cache the information stored in the DITA Map instead of parsing the DITA Map each time.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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