Hello,
is it somehow possible to do a XSL transformation of a document, which is currently shown in the oXygen Author?
I mean parse it at runtime and then directly show the result in the Editor?
So that die currently opened document is chanced, instead of creating a new document, which contains the transformation result.
Best regards,
Simon
Transform Document in Author at runtime
Transform Document in Author at runtime
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
Re: Transform Document in Author at runtime
Hi Simon,
We have a publicly exposed operation called ro.sync.ecss.extensions.commons.operations.XSLTOperation which was intended to be used in a document type defined action in order to be applied on a certain node and replace it with the result of an XSLT transformation. You should find the Java sources for XSLTOperation in the Author SDK:
http://www.oxygenxml.com/oxygen_sdk.htm ... horing_SDK
So even if you might not use it directly you could get some inspiration from the Java code.
As an alternative if you want to apply the XSLT over the entire document we also have API like:
ro.sync.exml.workspace.api.editor.WSEditorBase.createContentReader()
and:
ro.sync.exml.workspace.api.editor.WSEditorBase.reloadContent(Reader, boolean)
So you could create a reader over the entire content, use our API to create an XSLT transformer:
authorAccess.getXMLUtilAccess().createXSLTTransformer(xslSrc, null, AuthorXMLUtilAccess.TRANSFORMER_SAXON_PROFESSIONAL_EDITION);
transform and then get the XML and reload it back in the editor.
Regards,
Radu
We have a publicly exposed operation called ro.sync.ecss.extensions.commons.operations.XSLTOperation which was intended to be used in a document type defined action in order to be applied on a certain node and replace it with the result of an XSLT transformation. You should find the Java sources for XSLTOperation in the Author SDK:
http://www.oxygenxml.com/oxygen_sdk.htm ... horing_SDK
So even if you might not use it directly you could get some inspiration from the Java code.
As an alternative if you want to apply the XSLT over the entire document we also have API like:
ro.sync.exml.workspace.api.editor.WSEditorBase.createContentReader()
and:
ro.sync.exml.workspace.api.editor.WSEditorBase.reloadContent(Reader, boolean)
So you could create a reader over the entire content, use our API to create an XSLT transformer:
authorAccess.getXMLUtilAccess().createXSLTTransformer(xslSrc, null, AuthorXMLUtilAccess.TRANSFORMER_SAXON_PROFESSIONAL_EDITION);
transform and then get the XML and reload it back in the editor.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com