create/reuse content component
Post here questions and problems related to editing and publishing DITA content.
			- 
				dchapman
- Posts: 18
- Joined: Mon Jul 29, 2013 8:57 pm
create/reuse content component
Hi,
I tried to select the content I want to put in a separate component for reuse using the mouse in Author mode as the instructions say. The content I selected were a number of steps in a task. Although the steps I wanted were highlighted, the end result was a separate component with the entire task body (although I chose /step as the element type in the Reuse Content combo box.
I edited the separate component to get rid of the steps I didn't want. How do I just get the content I highlighted Or is that not possible?
I then tried to insert the reference in another task topic. I can't find the right position for the cursor to insert the reference. Am I supposed to create a step element and place the cursor in that to insert my component? I've tried a bunch of different locations for the cursor and still get an invalid message.
Thanks
			
			
									
									
						I tried to select the content I want to put in a separate component for reuse using the mouse in Author mode as the instructions say. The content I selected were a number of steps in a task. Although the steps I wanted were highlighted, the end result was a separate component with the entire task body (although I chose /step as the element type in the Reuse Content combo box.
I edited the separate component to get rid of the steps I didn't want. How do I just get the content I highlighted Or is that not possible?
I then tried to insert the reference in another task topic. I can't find the right position for the cursor to insert the reference. Am I supposed to create a step element and place the cursor in that to insert my component? I've tried a bunch of different locations for the cursor and still get an invalid message.
Thanks
- 
				dchapman
- Posts: 18
- Joined: Mon Jul 29, 2013 8:57 pm
Re: create/reuse content component
OK, I see the part about the "ancestor elements of the current element" to quote the Oxygen documentation. So I cannot simply create a reusable component of some steps that I can insert into another task, within other steps that are contained in the <steps></steps> element?
That's what gets inserted into my task, the conref looks like this:
<steps conref="ref_ChooseAffinityAttr#ReusableComponent_dv3_lf1_np/steps_ev3_lf1_np"
id="steps_h2c_451_np">
<step>
<cmd/>
</step>
</steps>
I ignored the warning and inserted into my task just to see what happened. So I basically have a steps element within a steps element in the task I'm trying to use the conref. How granular can I be?
			
			
									
									
						That's what gets inserted into my task, the conref looks like this:
<steps conref="ref_ChooseAffinityAttr#ReusableComponent_dv3_lf1_np/steps_ev3_lf1_np"
id="steps_h2c_451_np">
<step>
<cmd/>
</step>
</steps>
I ignored the warning and inserted into my task just to see what happened. So I basically have a steps element within a steps element in the task I'm trying to use the conref. How granular can I be?
- 
				Radu
- Posts: 9545
- Joined: Fri Jul 09, 2004 5:18 pm
Re: create/reuse content component
Hi Dianne,
The Oxygen "Create Reusable Component" action right now it limited to created a reusable component from only one XML element.
In your case, you would like to make a range of DITA steps reusable, this is possible with DITA 1.2.
Here's how you could do this:
You could manually create a DITA task which defines those steps which will later be reused with content like:
Then from the task where you want to reuse the steps you should place the caret between existing <step> elements and use Oxygen's Insert DITA Content Reference action to insert a content reference range (the table in the dialog used to insert a conref allows multiple selection so you can select the first and the last step).
The inserted content in the source topic should be something like:
Regards,
Radu
			
			
									
									The Oxygen "Create Reusable Component" action right now it limited to created a reusable component from only one XML element.
In your case, you would like to make a range of DITA steps reusable, this is possible with DITA 1.2.
Here's how you could do this:
You could manually create a DITA task which defines those steps which will later be reused with content like:
Code: Select all
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="reuseTask">
    <title></title>
    <shortdesc/>
    <taskbody>
        <context>
            <p></p>
        </context>
        <steps>
            <step id="stepFirst">
                <cmd>1</cmd>
            </step>
            <step>
                <cmd>2</cmd>
            </step>
            <step>
                <cmd>3</cmd>
            </step>
            <step id="stepLast">
                <cmd>4</cmd>
            </step>
        </steps>
    </taskbody>
</task>
The inserted content in the source topic should be something like:
Code: Select all
            <step conref="../topics/reuse.dita#reuseTask/stepFirst"
                conrefend="../topics/reuse.dita#reuseTask/stepLast">
                <cmd/>
            </step>
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