Show namespaces of elements
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 2
- Joined: Wed Nov 12, 2014 7:37 pm
Show namespaces of elements
I have an XML doc that is validated with a Schema. With the XML Editor, is it possible to find out what namespace the schema processor thinks an unqualified name is in? For example, can I get a copy of the XML doc but with any unqualified names replaced by qualified names?
Thanks.
Greg Reese
Thanks.
Greg Reese
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Show namespaces of elements
Hi Greg,
You can check the namespace of the element at current cursor position in the Model view (menu > Window > Show View > Model). Note that the Model view is updated dynamically depending on the cursor position, so you can simply click on another element and glance at the Model view to check the namespace.
Oxygen doesn't have a tool that automatically adds/generates namespace prefixes to all elements with unqualified names. However, if there are a few namespaces, you can use the contextual menu (right click) on an element and pick Refactoring > Rename Prefix... to manually add a namespace prefix for all the elements from each of those namespaces.
The Rename prefix dialog shows you the current prefix and namespace in the title bar. Simply introduce the new prefix name (e.g. ns1) and select the option Rename current prefix in all document to add that namespace prefix for all the elements from that namespace found in the document.
Regards,
Adrian
You can check the namespace of the element at current cursor position in the Model view (menu > Window > Show View > Model). Note that the Model view is updated dynamically depending on the cursor position, so you can simply click on another element and glance at the Model view to check the namespace.
Oxygen doesn't have a tool that automatically adds/generates namespace prefixes to all elements with unqualified names. However, if there are a few namespaces, you can use the contextual menu (right click) on an element and pick Refactoring > Rename Prefix... to manually add a namespace prefix for all the elements from each of those namespaces.
The Rename prefix dialog shows you the current prefix and namespace in the title bar. Simply introduce the new prefix name (e.g. ns1) and select the option Rename current prefix in all document to add that namespace prefix for all the elements from that namespace found in the document.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
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