Get current document schema url
Post here questions and problems related to oXygen frameworks/document types.
Get current document schema url
We are developing DTAs which have actions (implementations of ro.sync.ecss.extensions.api.AuthorOperation) that extend the functionality of Author. I have a situation where i need to get the url of the schema of the current document. I know this should be simple, but a search of the forums and api turned up no explicit example.
My first attempt was similar to this (where the variable 'aa' is an AuthorAccess implementation):
Unfortunately, the String this returns was only ${dsu} instead of a valid path to a schema location.
Another attempt was:
But still nothing.
The schema is valid, declared in the dta framework and validates the open document so Author is aware of the associated schema. Is there a better way?
Thanks,
Chris
My first attempt was similar to this (where the variable 'aa' is an AuthorAccess implementation):
Code: Select all
aa.getUtilAccess().expandEditorVariables(EditorVariables.DETECTED_SCHEMA_URL, null);
Another attempt was:
Code: Select all
EditorVariables.expandEditorVariables(EditorVariables.DETECTED_SCHEMA_URL, aa.getDocumentController().getAuthorDocumentNode().getSystemID());
The schema is valid, declared in the dta framework and validates the open document so Author is aware of the associated schema. Is there a better way?
Thanks,
Chris
-
- Posts: 1008
- Joined: Wed Nov 16, 2005 11:11 am
Re: Get current document schema url
Post by alex_jitianu »
Hello Chris,
It looks like EditorVariables.DETECTED_SCHEMA_URL variable only gets expanded inside a few, specific contexts. Please try:
Best regards,
Alex
It looks like EditorVariables.DETECTED_SCHEMA_URL variable only gets expanded inside a few, specific contexts. Please try:
Code: Select all
aa.getDocumentController().getAuthorSchemaManager().getGrammarURLs();
Alex
Return to “SDK-API, Frameworks - Document Types”
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