"Generate Sample XML" add a namespace
Oxygen general issues.
-
- Posts: 3
- Joined: Thu Jan 06, 2011 7:09 pm
"Generate Sample XML" add a namespace
I'm using "Generate Sample XML Files..." to generate xml from a schema. when the xml is generated there is no namespace on the nodes.
For example: <person> rather than <ns1:person>
I've set the defaultNamespace and there's only one namespaceMapping.
How can I get the namespace to be added to the elements?
Thanks
Michael
For example: <person> rather than <ns1:person>
I've set the defaultNamespace and there's only one namespaceMapping.
How can I get the namespace to be added to the elements?
Thanks
Michael
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: "Generate Sample XML" add a namespace
Hello,
What settings are you using in the Namespaces section from the Generate Sample XML Files dialog?
If you picked a namespace(e.g. my.namespace) from the Default Namespace combo then in the generated sample you will find the default namespace declaration on the root(e.g. <root xmlns="my.namespace">).
This makes redundant the prefix declaration for the same namespace, so it is omitted in the samples(it wouldn't be used anyway).
If you want to force a namespace prefix to be used in the generated sample then set the Default Namespace to <NO_NAMESPACE> or if you have several namespaces, a different namespace than the one you want a prefix for.
Regards,
Adrian
What settings are you using in the Namespaces section from the Generate Sample XML Files dialog?
If you picked a namespace(e.g. my.namespace) from the Default Namespace combo then in the generated sample you will find the default namespace declaration on the root(e.g. <root xmlns="my.namespace">).
This makes redundant the prefix declaration for the same namespace, so it is omitted in the samples(it wouldn't be used anyway).
If you want to force a namespace prefix to be used in the generated sample then set the Default Namespace to <NO_NAMESPACE> or if you have several namespaces, a different namespace than the one you want a prefix for.
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)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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