Ditaval + subject scheme: automatically filter parent subject
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 22
- Joined: Fri Feb 19, 2016 2:41 pm
Ditaval + subject scheme: automatically filter parent subject
Post by jochemdevos »
Hi all,
We're a bit stuck when working on a Taxonomy using a subject scheme. To try to understand this I've pulled out some demo data found at https://www.oxygenxml.com/doc/versions/ ... e-map.html
So the scheme is as follows:
And the DITAVAL is as follows, for demo purposes:
When profiling content (Select element, right click, edit profiling attributes) the audience attribute provides checkboxes as described by the scheme. When selecting a lower level subject to filter on, the parent is not automatically checked, which is okay I suppose as long as the processors can make the relation with the parent.
Question 1: When using 'Import from DITAVAL' to create a Profiling set, the filter in Author mode is applied as I would suspect: content flagged with 'novice', which is a novice therapist, is excluded. However, when running a PDF transformation with the DITAVAL set as filter it only excludes content tagged with 'therapist'. Why is this the case?
Question 2: Is it also possible to get this 'inherited filtering' when using the exclude unless included approach, e.g.:
Here's some demo content that I used:
Thanks you, kind regards,
Jochem de Vos
We're a bit stuck when working on a Taxonomy using a subject scheme. To try to understand this I've pulled out some demo data found at https://www.oxygenxml.com/doc/versions/ ... e-map.html
So the scheme is as follows:
Code: Select all
<subjectScheme>
<subjectdef keys="users">
<subjectdef keys="therapist">
<subjectdef keys="novice"/>
<subjectdef keys="expert"/>
</subjectdef>
<subjectdef keys="oncologist"/>
<subjectdef keys="physicist"/>
<subjectdef keys="radiologist"/>
</subjectdef>
<enumerationdef>
<attributedef name="audience"/>
<subjectdef keyref="users"/>
</enumerationdef>
</subjectScheme>
Code: Select all
<val>
<prop action="exclude" att="audience" val="therapist" />
</val>
Question 1: When using 'Import from DITAVAL' to create a Profiling set, the filter in Author mode is applied as I would suspect: content flagged with 'novice', which is a novice therapist, is excluded. However, when running a PDF transformation with the DITAVAL set as filter it only excludes content tagged with 'therapist'. Why is this the case?
Question 2: Is it also possible to get this 'inherited filtering' when using the exclude unless included approach, e.g.:
Code: Select all
<val>
<prop action="exclude" att="audience"/>
<prop action="include" att="audience" val="therapist" />
</val>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_vcz_2nm_vz">
<title>Test</title>
<body>
<p>Content marked with nothing</p>
<p audience="oncologist">Content marked with oncologist</p>
<p audience="therapist">Content marked with therapist</p>
<p audience="novice">Content marked with novice therapist</p>
</body>
</topic>
Jochem de Vos
Re: Ditaval + subject scheme: automatically filter parent subject
Hi Jochem,
Support for filtering content based on subject schemes in the DITA Open Toolkit publishing engine is not really complete, so you may encounter various problems with it.
Please see some answers below:
Regards,
Radu
Support for filtering content based on subject schemes in the DITA Open Toolkit publishing engine is not really complete, so you may encounter various problems with it.
Please see some answers below:
Exactly.When profiling content (Select element, right click, edit profiling attributes) the audience attribute provides checkboxes as described by the scheme. When selecting a lower level subject to filter on, the parent is not automatically checked, which is okay I suppose as long as the processors can make the relation with the parent.
The topicref to the subject scheme map needs to have the attribute type="subjectScheme" set on it otherwise the hierarchical filtering does not work. This is not required by the specification, it is a bug/limitation in the publishing engine.Question 1: When using 'Import from DITAVAL' to create a Profiling set, the filter in Author mode is applied as I would suspect: content flagged with 'novice', which is a novice therapist, is excluded. However, when running a PDF transformation with the DITAVAL set as filter it only excludes content tagged with 'therapist'. Why is this the case?
Not sure, you can try that after following the advice above.Question 2: Is it also possible to get this 'inherited filtering' when using the exclude unless included approach, e.g.:
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 22
- Joined: Fri Feb 19, 2016 2:41 pm
Re: Ditaval + subject scheme: automatically filter parent subject
Post by jochemdevos »
Thanks again for your help Radu.
*edited: meant to say exclude instead of include
Perfect, including the type attribute did indeed filter the hierarchy properly during transformation. (exclude therapist when 'novice' is excluded in ditaval*)Radu wrote:The topicref to the subject scheme map needs to have the attribute type="subjectScheme" set on it otherwise the hierarchical filtering does not work. This is not required by the specification, it is a bug/limitation in the publishing engine.
Unfortunately this does not work. As I remember from documentation: the parent only inherits filtering if the ditaval does not specify what to do with it. It seems a general exclude (<prop action="exclude" att="audience"/>) gets priority over an include on a child subject (novice).Radu wrote:Not sure, you can try that after following the advice above.Question 2: Is it also possible to get this 'inherited filtering' when using the exclude unless included approach, e.g.:
*edited: meant to say exclude instead of include
Last edited by jochemdevos on Tue May 16, 2017 12:01 pm, edited 1 time in total.
Re: Ditaval + subject scheme: automatically filter parent subject
Hi Jochem,
I confirm your findings for (2), not sure if it's on purpose or a side effect of the Subject Scheme filtering support not being fully implemented.
Regards,
Radu
I confirm your findings for (2), not sure if it's on purpose or a side effect of the Subject Scheme filtering support not being fully implemented.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 22
- Joined: Fri Feb 19, 2016 2:41 pm
Re: Ditaval + subject scheme: automatically filter parent subject
Post by jochemdevos »
Hi Radu,Radu wrote: I confirm your findings for (2), not sure if it's on purpose or a side effect of the Subject Scheme filtering support not being fully implemented.
I guess this works as designed. Although I'm interested how you or others would work around this, for those that use a subjectscheme with nested subjectdef elements.
Kind regards,
Jochem de Vos
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)
- ↳ 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