Duplicated ID elements from Author mode element split
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 84
- Joined: Tue Oct 11, 2005 9:17 am
- Location: Helsinki, Finland
- Contact:
Duplicated ID elements from Author mode element split
Oxygen version: 10.0
Steps to reproduce:
Steps to reproduce:
- Create new Docbook article
- In Text mode, add id attribute to para element.
- Switch to Author mode.
- Split para element by pressing Enter key.
- Switch back to Text mode.
- Both para elements have the same id attribute.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Duplicated ID elements from Author mode element split
Hi Jarno,
I understand the issue and I just encountered a few days ago. There are two scenarios:
1 - you want an ID on the new element
2 - you do not want an ID on the new element
In the first case it helps to have the ID duplicated as in general the new value will be similar with the old value and it is easier to change an existing value than to enter it from scratch.
In the second case the fact that the ID is copied will require the user to edit the attributes to remove the ID attribute. The problem is signaled by the automatic validation that will indicate the invalid ID value. In the case when the ID attribute is not defined to be of type ID then this can be indeed a problem because the error is not signaled by the validation.
Analyzing the above I would say that the current behavior is not that bad.
Now, taking into account the DITA case, where you have IDs specified as NMTOKEN I would say that the main problem is not with the ID values defined as ID - as these are signaled by the automatic validation - but with other type of values.
Therefore as a solution I propose enhancing the framework (document type) support with the possibility to specify a SplitHandler that will receive each attribute name and value and can return null to remove it or the same or modified name/value. This allows also implementing for example a SplitHandler that will create automatically a new ID similar with the one from the element to be split. So, what do you think about this possible solution?
Regards,
George
I understand the issue and I just encountered a few days ago. There are two scenarios:
1 - you want an ID on the new element
2 - you do not want an ID on the new element
In the first case it helps to have the ID duplicated as in general the new value will be similar with the old value and it is easier to change an existing value than to enter it from scratch.
In the second case the fact that the ID is copied will require the user to edit the attributes to remove the ID attribute. The problem is signaled by the automatic validation that will indicate the invalid ID value. In the case when the ID attribute is not defined to be of type ID then this can be indeed a problem because the error is not signaled by the validation.
Analyzing the above I would say that the current behavior is not that bad.
Now, taking into account the DITA case, where you have IDs specified as NMTOKEN I would say that the main problem is not with the ID values defined as ID - as these are signaled by the automatic validation - but with other type of values.
Therefore as a solution I propose enhancing the framework (document type) support with the possibility to specify a SplitHandler that will receive each attribute name and value and can return null to remove it or the same or modified name/value. This allows also implementing for example a SplitHandler that will create automatically a new ID similar with the one from the element to be split. So, what do you think about this possible solution?
Regards,
George
George Cristian Bina
-
- Posts: 84
- Joined: Tue Oct 11, 2005 9:17 am
- Location: Helsinki, Finland
- Contact:
Re: Duplicated ID elements from Author mode element split
Sounds like a solution that might work. I tested this with DITA paragraphs with conref attribute and that's another case where the attribute probably not be copied on split.
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Duplicated ID elements from Author mode element split
Hi Jarno,
We added some handlers for the split and for frameworks like DITA, Docbook 4 and 5, TEI P4 and P5, XHTML id's are no longer copied on split.
In addition for DITA the "conref" will be no longer copied on split.
The changes will probably be available in Oxygen 10.3. If you want a beta kit to test for this and for http://www.oxygenxml.com/forum/viewtopi ... 053#p12053 you can contact us and we'll provide a beta.
See http://www.oxygenxml.com/techSupport.html
Regards,
Radu
We added some handlers for the split and for frameworks like DITA, Docbook 4 and 5, TEI P4 and P5, XHTML id's are no longer copied on split.
In addition for DITA the "conref" will be no longer copied on split.
The changes will probably be available in Oxygen 10.3. If you want a beta kit to test for this and for http://www.oxygenxml.com/forum/viewtopi ... 053#p12053 you can contact us and we'll provide a beta.
See http://www.oxygenxml.com/techSupport.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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