How to get current document type
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 67
- Joined: Thu Oct 29, 2020 12:01 am
How to get current document type
Post by manojdcoder »
Is it possible to get current document type, whether its DITA or DocBook etc., especially from JavaScript side?
I see getDocument().documentType in AuthorEditingSupport[1] but it reads the documentType property of document always returns null
[1]https://www.oxygenxml.com/maven/com/oxy ... pport.html
I see getDocument().documentType in AuthorEditingSupport[1] but it reads the documentType property of document always returns null
[1]https://www.oxygenxml.com/maven/com/oxy ... pport.html
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: How to get current document type
Post by cristi_talau »
The Document.documentType property is specified by this property: https://www.w3.org/TR/DOM-Level-2-Core/ ... -412266927 , but Web Author does not support this part of the DOM specification.
To identity the document type you can look at the document structure. For example, for DITA there is a "DITAArchVersion" attribute on the root. For DocBook, the namespace of the root element is "http://docbook.org/ns/docbook" and so on.
To identity the document type you can look at the document structure. For example, for DITA there is a "DITAArchVersion" attribute on the root. For DocBook, the namespace of the root element is "http://docbook.org/ns/docbook" and so on.
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