Get current document schema url
Posted: Sat Jan 09, 2016 12:38 am
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