Specialize Task Topic with New Element: Start at Topic Level and Not Task Level?
Forum topic: Submitted by sarah on Sat, 2010-08-28 19:39.
I want to create a type of task topic that contains an element that the DITA model task topic does not seem to have. My first thought is to start with a task topic and specialize it to contain the new element. But then I read that a specialization must be more restrictive than its parent. So if I want to add a new element that does not exist in the parent task topic, does that mean I have to create a specialization at the same level as the model DITA task topic instead of as a child of the DITA task topic?
What are you trying to do?
It's unclear to me what you're attempting to do. Are you trying to add an element before the task element, basically adding another topic wrapper (this would mean specializing from the multi-topic) or are you trying to add a new section-level element to task? Are you looking to add another element at a lower level than a section?
Give an example and I might be able to give a useful answer.
Julio J. Vazquez
SDI
jvazquez@sdicorp.com
919-354-1123
I am trying to create a new
I am trying to create a new element section within a task topic. For example, I want to add a task subtitle right before the steps in the task. So the specialized task would have the task topic title, a description of why you want to do the task, a task subtitle for the steps, and then the steps.
You may only need an xslt override
Based on what you describe, you really don't need a specialization, just an xslt override. Based on what you stated, context already meets your need for the description and steps is okay as is. What you need to do is override the processing to place titles on those sections for the output type. You may want to look at my example custom.xml to see how to do it for PDF. You might have to replicate that sort of thing for the HTML processing or set up a test to determine the transtype and pick the right output to create in the transform.
HTH,
Julio J. Vazquez
SDI
jvazquez@sdicorp.com
919-354-1123
Would Like To See Custom.xml
Thanks for your reply. I would love to see your custom.xml file. Can you provide a link to it or tell me how to find it?
Hi Sara, I've posted a
Hi Sara,
I've posted a copy of the custom.xsl file to my blog here. Just search for custom.xsl in the blogs.
Julio J. Vazquez
SDI
jvazquez@sdicorp.com
919-354-1123
Specialize Task Topic with New Element: Start at Topic Level and
It depends on what you're trying to do. It also depends on whether you're starting with the DITA 1.1 task model or the DITA 1.2 task model, which is less restrictive.
You can add new element types as long as they are specialized from elements already allowed and as long as the resulting content model doesn't allow the element to occur where it's specialization base would not have been allowed in the base topic type.
What you cannot do is add a new element type whose base type is not allowed in the base topic type.
Are you willing to ask this question on the DITA User's Yahoo group?
It's a good question but I'd prefer to answer it in that forum rather than here.
Cheers,
Eliot