Rename elements in a table column at once
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 2
- Joined: Thu Jan 11, 2024 10:24 pm
Rename elements in a table column at once
Question: Is there a way to rename a recurring element in a table's column all at once without affecting the other columns that have that same element?
I am trying to rename all the <p> elements in my table's first column without changing the <p> elements in all the other columns.
So far I've tried refactoring and using grid mode, but nothing seems to work.
I know I can change each <p> element one at a time, but I need to update several tables, and a single click solution would be great to know, if there is one.
I am trying to rename all the <p> elements in my table's first column without changing the <p> elements in all the other columns.
So far I've tried refactoring and using grid mode, but nothing seems to work.
I know I can change each <p> element one at a time, but I need to update several tables, and a single click solution would be great to know, if there is one.
-
- Posts: 2
- Joined: Thu Jan 11, 2024 10:24 pm
Re: Rename elements in a table column at once
I figured it out.
In Text mode, right click the element you would like to rename and select Copy XPath.
In Author mode, navigate to the Refactoring menu (this can be done in multiple ways).
In the Refactoring menu, select Rename element. A new menu displays.
In the text box titled Target elements (XPath), paste the copied XPath.
Edit the pasted XPath by removing the bracketed number next to row.
Example:
Paste: /reference/refbody[1]/section[1]/p[1]/table[1]/tgroup[1]/tbody[1]/row[2]/entry[1]/p[1]
Paste with edit: /reference/refbody[1]/section[1]/p[1]/table[1]/tgroup[1]/tbody[1]/row/entry[1]/p[1]
In the text box titled New local name, enter the new element you would like the current element to be renamed to.
Select Finish.
In addition to this, if you would like to insert an element into an column entries that have text but no other element, you can select Wrap element content in the Refactoring menu.
In Text mode, right click the element you would like to rename and select Copy XPath.
In Author mode, navigate to the Refactoring menu (this can be done in multiple ways).
In the Refactoring menu, select Rename element. A new menu displays.
In the text box titled Target elements (XPath), paste the copied XPath.
Edit the pasted XPath by removing the bracketed number next to row.
Example:
Paste: /reference/refbody[1]/section[1]/p[1]/table[1]/tgroup[1]/tbody[1]/row[2]/entry[1]/p[1]
Paste with edit: /reference/refbody[1]/section[1]/p[1]/table[1]/tgroup[1]/tbody[1]/row/entry[1]/p[1]
In the text box titled New local name, enter the new element you would like the current element to be renamed to.
Select Finish.
In addition to this, if you would like to insert an element into an column entries that have text but no other element, you can select Wrap element content in the Refactoring menu.
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