Document creation API?
Oxygen general issues.
-
- Posts: 22
- Joined: Fri Aug 09, 2013 11:03 am
Document creation API?
Hello there,
new to Oxygen - I want to develop a plugin with a button that will create a document based on the provided XSD (skipping the wizard, I want to create the document type I need in only one button).
I can't find the right API to create a document... thanks for pointing me toward what I'm missing!
Yann
new to Oxygen - I want to develop a plugin with a button that will create a document based on the provided XSD (skipping the wizard, I want to create the document type I need in only one button).
I can't find the right API to create a document... thanks for pointing me toward what I'm missing!
Yann
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Document creation API?
Post by alex_jitianu »
Hello,
You need an Workspace Access plugin:
http://oxygenxml.com/doc/ug-editor/#con ... lugin.html
Amongst other things, such a plugin can contribute actions to the toolbar. The API that can do that:
ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.addToolbarComponentsCustomizer(ToolbarComponentsCustomizer)
Once you've put a button on the toolbar this button should either create a new untitled editor or maybe create a file on disk and open it in an editor:
ro.sync.exml.workspace.api.Workspace.createNewEditor(String, String, String)
ro.sync.exml.workspace.api.Workspace.open(URL)
There is a sample Workspace Access plugin available at:
http://oxygenxml.com/oxygen_sdk.html#Developer_Plugins
Best regards,
Alex
You need an Workspace Access plugin:
http://oxygenxml.com/doc/ug-editor/#con ... lugin.html
Amongst other things, such a plugin can contribute actions to the toolbar. The API that can do that:
ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.addToolbarComponentsCustomizer(ToolbarComponentsCustomizer)
Once you've put a button on the toolbar this button should either create a new untitled editor or maybe create a file on disk and open it in an editor:
ro.sync.exml.workspace.api.Workspace.createNewEditor(String, String, String)
ro.sync.exml.workspace.api.Workspace.open(URL)
There is a sample Workspace Access plugin available at:
http://oxygenxml.com/oxygen_sdk.html#Developer_Plugins
Best regards,
Alex
-
- Posts: 22
- Joined: Fri Aug 09, 2013 11:03 am
Re: Document creation API?
Hi Alex,
thanks for the reply. I'm wondering if there is an API call that does the same as the wizard (Create XML file / use XSD template), or if we have to create by hand the file content that the wizard would produce, and then create the new editor with this file?
Thanks
Yannick
thanks for the reply. I'm wondering if there is an API call that does the same as the wizard (Create XML file / use XSD template), or if we have to create by hand the file content that the wizard would produce, and then create the new editor with this file?
Thanks
Yannick
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Document creation API?
Post by alex_jitianu »
Hi Yannick,
There is no API to invoke the New dialog wizard so you'll have to do as you said. You can have a template that also contains the schema association (you could also have a catalog to resolve the schema) and either create a new editor over that content or save the content on disk and open that location in an editor.
Best regards,
Alex
There is no API to invoke the New dialog wizard so you'll have to do as you said. You can have a template that also contains the schema association (you could also have a catalog to resolve the schema) and either create a new editor over that content or save the content on disk and open that location in an editor.
Best regards,
Alex
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