Transform Document in Author at runtime
Oxygen general issues.
-
- Posts: 206
- Joined: Thu Dec 01, 2011 4:22 pm
- Location: Hamburg, Germany
Transform Document in Author at runtime
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
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
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
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
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