How to automatically generate ID
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 1
- Joined: Wed Mar 28, 2018 7:30 pm
How to automatically generate ID
Hello,
Fair warning, I am a beginner and not very knowledgeable. I only use Oxygen for research purposes.
I have an XML file defined by an XML schema. The XML file is just a text. I use elements to tag linguistic parameters that interest me. To give a simplified illustration:
<file>
<paragraph id="1">
<sentence id="1-1">This <verb id="1-1-1">is</verb> a sentence.</sentence>
<sentence id="1-2">This is a sentence.</sentence>
<sentence id="1-3">This is a sentence.</sentence>
</paragraph>
<paragraph id="2">
<sentence id="2-1">This is a sentence.</sentence>
<sentence id="2-2">This is a sentence.</sentence>
<sentence id="2-3">This is a sentence.</sentence>
</paragraph>
</file>
The 'id' attribute is defined as xs:ID. Since it is a very long text, I would like to automatically generate IDs based on this pattern.
I've read this page, but I don't see the "Generate IDs" when I right-click on an element in Author view. I can't find the ID Options dialog box either. I see the pages makes reference to DITA and DocBook specific menus, but I don't really understand what DITA or DocBook is and I can't find these menus.
I apologize if this is a very basic question.
Thank you for any help.
Fair warning, I am a beginner and not very knowledgeable. I only use Oxygen for research purposes.
I have an XML file defined by an XML schema. The XML file is just a text. I use elements to tag linguistic parameters that interest me. To give a simplified illustration:
<file>
<paragraph id="1">
<sentence id="1-1">This <verb id="1-1-1">is</verb> a sentence.</sentence>
<sentence id="1-2">This is a sentence.</sentence>
<sentence id="1-3">This is a sentence.</sentence>
</paragraph>
<paragraph id="2">
<sentence id="2-1">This is a sentence.</sentence>
<sentence id="2-2">This is a sentence.</sentence>
<sentence id="2-3">This is a sentence.</sentence>
</paragraph>
</file>
The 'id' attribute is defined as xs:ID. Since it is a very long text, I would like to automatically generate IDs based on this pattern.
I've read this page, but I don't see the "Generate IDs" when I right-click on an element in Author view. I can't find the ID Options dialog box either. I see the pages makes reference to DITA and DocBook specific menus, but I don't really understand what DITA or DocBook is and I can't find these menus.
I apologize if this is a very basic question.
Thank you for any help.
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to automatically generate ID
Hi,
The "Generate IDs" appears for certain XML vocabularies like DITA or Docbook which are supported out of the box by Oxygen. And it generates random IDs which do not match your expectation.
What you want could possibly be achieved using our Oxygen SDK which is Java based to customize your framework extension but you would need Java knowledge.
Are you editing your XML content in the Text or in the Author visual editing mode?
When do you want the ID generated, when each <sentence> is inserted? Or on demand, when you call a certain action to insert the ID on the current <sentence>?
Regards,
Radu
The "Generate IDs" appears for certain XML vocabularies like DITA or Docbook which are supported out of the box by Oxygen. And it generates random IDs which do not match your expectation.
What you want could possibly be achieved using our Oxygen SDK which is Java based to customize your framework extension but you would need Java knowledge.
Are you editing your XML content in the Text or in the Author visual editing mode?
When do you want the ID generated, when each <sentence> is inserted? Or on demand, when you call a certain action to insert the ID on the current <sentence>?
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)
- ↳ 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