Auto-generate ${uuid} beginning with letter
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 19
- Joined: Thu Nov 14, 2013 1:04 pm
Auto-generate ${uuid} beginning with letter
Post by joerg.hambuch »
Hi,
oXygen auto-generates UUIDs which begin with a number or a letter. Is it possible to generate UUIDs only beginning with a letter, not a number? Otherwise generated uuids are not valid when used in id attributes.
We'd like to avoid prefixing the generated uuids with something like "id_" to stay conform to uuid standard.
Thanks in advance and best regards,
Jörg
oXygen auto-generates UUIDs which begin with a number or a letter. Is it possible to generate UUIDs only beginning with a letter, not a number? Otherwise generated uuids are not valid when used in id attributes.
We'd like to avoid prefixing the generated uuids with something like "id_" to stay conform to uuid standard.
Thanks in advance and best regards,
Jörg
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Auto-generate ${uuid} beginning with letter
Hi Jörg,
We use a method in the Java VM libraries which come with the Oxygen installation to generate this UUID so we do not have control over the way in which it computes the returned value.
Basically an UUID is a sequence of hexadecimal numbers so it can begin either with letters A-F or with figures:
http://en.wikipedia.org/wiki/Universall ... identifier
My suggestion for you is to prefix that value with a letter just to be sure it is a valid ID attribute name token.
Otherwise, if you are using Oxygen 16.1 you can implement a Java Workspace Access plugin and use the API ro.sync.exml.workspace.api.util.UtilAccess.addCustomEditorVariablesResolver(EditorVariablesResolver)
to add your custom editor variable resolver to resolve for example an editor variable like ${customUUID} to random values which always start with letters.
Regards,
Radu
We use a method in the Java VM libraries which come with the Oxygen installation to generate this UUID so we do not have control over the way in which it computes the returned value.
Basically an UUID is a sequence of hexadecimal numbers so it can begin either with letters A-F or with figures:
http://en.wikipedia.org/wiki/Universall ... identifier
My suggestion for you is to prefix that value with a letter just to be sure it is a valid ID attribute name token.
Otherwise, if you are using Oxygen 16.1 you can implement a Java Workspace Access plugin and use the API ro.sync.exml.workspace.api.util.UtilAccess.addCustomEditorVariablesResolver(EditorVariablesResolver)
to add your custom editor variable resolver to resolve for example an editor variable like ${customUUID} to random values which always start with letters.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 19
- Joined: Thu Nov 14, 2013 1:04 pm
Re: Auto-generate ${uuid} beginning with letter
Post by joerg.hambuch »
Hi Radu,
wow, pretty quick response time
This forum is an example for outstanding quality of support. I'll recommend you!
Thanks for your answer and the hint to the EditorVariableResolver.
Best regards,
Jörg
wow, pretty quick response time

Thanks for your answer and the hint to the EditorVariableResolver.
Best regards,
Jörg
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Auto-generate ${uuid} beginning with letter
Hi Jörg,
No problem.
One other workaround would be to use the ${id} editor variable which is a pseudo-unique ID value generated by our own code which has a smaller number of characters and it always starts with a letter, but it is not a value generated according to a certain standard.
Regards,
Radu
No problem.
One other workaround would be to use the ${id} editor variable which is a pseudo-unique ID value generated by our own code which has a smaller number of characters and it always starts with a letter, but it is not a value generated according to a certain standard.
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