auto-generate topicref attributes based on topic type
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 48
- Joined: Sat Jan 26, 2013 6:07 pm
auto-generate topicref attributes based on topic type
Post by mstrubberg »
I want to auto-generate the attributes on a topicref based on the root element (concept, reference, or task) in the Insert Reference window.
For a topicref to a concept topic the topicref attributes would be: format=dita, type= concept, scope=local
For a topicref to a task topic the topicref attributes would be: format=dita, type= task, scope=local
For a topicref to a reference topic the topicref attributes would be: format=dita, type= reference, scope=local
How can I auto-generated these fields so that the user doesn't have to populate them?
For a topicref to a concept topic the topicref attributes would be: format=dita, type= concept, scope=local
For a topicref to a task topic the topicref attributes would be: format=dita, type= task, scope=local
For a topicref to a reference topic the topicref attributes would be: format=dita, type= reference, scope=local
How can I auto-generated these fields so that the user doesn't have to populate them?
-
- Posts: 1008
- Joined: Wed Nov 16, 2005 11:11 am
Re: auto-generate topicref attributes based on topic type
Post by alex_jitianu »
Hi,
Currently there is no way to automatically configure these attributes. I've added a feature request to provide this level of customization.
As a side note, your values for the "format" and "scope" attributes are actually the default values and because Oxygen leaves these untouched, you will obtain the same result when the reference gets processed. So you only have to worry for the "type" attribute.
Best regards,
Alex
Currently there is no way to automatically configure these attributes. I've added a feature request to provide this level of customization.
As a side note, your values for the "format" and "scope" attributes are actually the default values and because Oxygen leaves these untouched, you will obtain the same result when the reference gets processed. So you only have to worry for the "type" attribute.
Best regards,
Alex
Re: auto-generate topicref attributes based on topic type
Hi,
Just to update this discussion, Oxygen 17.1 should contain in the Preferences->DITA page preferences to automatically set default attributes for topicrefs.
Regards,
Radu
Just to update this discussion, Oxygen 17.1 should contain in the Preferences->DITA page preferences to automatically set default attributes for topicrefs.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: auto-generate topicref attributes based on topic type
Well, that's OT, but for what does the OT need the attribute? I cannot find information about it in the spec. Is it used with relationship tables?
Code: Select all
type
stefan-jung.org – Your DITA/DITA-OT XML consultant
Re: auto-generate topicref attributes based on topic type
Hi Stefan,
In the DITA OT pre-processing stage if you do not explicitly set @type attributes on references, they are deduced from the actual target. This makes sense because setting the @type attribute on each link is redundant information, the same information can be inferred by looking at the actual target element. So it's not necessary. From what I know the type information, once derived is indeed used for some static labels in the related links sections.
But, the problem is that the @type attribute cascades in the DITA Map:
http://docs.oasis-open.org/dita/v1.2/os ... tamap.html
And the problem is that other XML editors set the @type attribute on topicrefs by default.
So if somebody edits a DITA Map with a competing XML Editor, they will have in the DITA Map at some point something like:
then they open the DITA Map in Oxygen and add a new topicref inside the existing one using the Oxygen default options, and after this the DITA Map looks like this:
Because the @type attribute cascades, the DITA OT will complain that the "topic.dita" is referenced as a task but it is in fact a topic.
So we needed to add these settings to automatically generate the @type attribute (also also @scope and @format) on topicrefs in order to be more compatible when editing DITA content created with other tools.
Regards,
Radu
In the DITA OT pre-processing stage if you do not explicitly set @type attributes on references, they are deduced from the actual target. This makes sense because setting the @type attribute on each link is redundant information, the same information can be inferred by looking at the actual target element. So it's not necessary. From what I know the type information, once derived is indeed used for some static labels in the related links sections.
But, the problem is that the @type attribute cascades in the DITA Map:
http://docs.oasis-open.org/dita/v1.2/os ... tamap.html
And the problem is that other XML editors set the @type attribute on topicrefs by default.
So if somebody edits a DITA Map with a competing XML Editor, they will have in the DITA Map at some point something like:
Code: Select all
<topicref href="task.dita" type="task"/>
Code: Select all
<topicref href="task.dita" type="task">
<topicref href="topic.dita"/>
</topicref>
So we needed to add these settings to automatically generate the @type attribute (also also @scope and @format) on topicrefs in order to be more compatible when editing DITA content created with other tools.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: auto-generate topicref attributes based on topic type
Thanks Radu,
I did not know that. This cascading behavior is quite strange. So for me as a writer it is important to know, that I should ever or never use the attribute, because we publish sometimes PDF files by build script, so we sometimes do not invoke the publication via Oxygen. In that case we would be affected by this cascading issue. I have to think about it and maybe completely prohibit using the type attribute by Schematron. It seems, that this attribute is quite obsolete but error-prone for topicref elements.
Greetings,
Stefan
I did not know that. This cascading behavior is quite strange. So for me as a writer it is important to know, that I should ever or never use the attribute, because we publish sometimes PDF files by build script, so we sometimes do not invoke the publication via Oxygen. In that case we would be affected by this cascading issue. I have to think about it and maybe completely prohibit using the type attribute by Schematron. It seems, that this attribute is quite obsolete but error-prone for topicref elements.
Greetings,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
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