XML/XSD Default Element Values
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 2
- Joined: Wed Jun 20, 2007 7:43 am
- Location: n/a
XML/XSD Default Element Values
Post by sauronlord »
Hi,
I'm new to XML, XSD and XSLT.
I was wondering if there is a way to "fill out" an XML document with its default values, as if "expanded" so that my XSLT processor could use these defaults in generating the output.
I think if I had a schema-aware XSLT processor (SAXON-SA), then I could get this done easily as the transformation would be done against an XML document validated against an XSD.
That is not an option for my company for various reasons.
Is there a 2-stage process I can execute (in Java SAX/DOM?) that will "fill out" the required default values for elements or attributes?
I see there are validator classes, but none of these allow me to "write back" the resultant XML(with defaults populated) so that I may use the "expanded" form in subsequent processing.
Thanks,
I'm new to XML, XSD and XSLT.
I was wondering if there is a way to "fill out" an XML document with its default values, as if "expanded" so that my XSLT processor could use these defaults in generating the output.
I think if I had a schema-aware XSLT processor (SAXON-SA), then I could get this done easily as the transformation would be done against an XML document validated against an XSD.
That is not an option for my company for various reasons.
Is there a 2-stage process I can execute (in Java SAX/DOM?) that will "fill out" the required default values for elements or attributes?
I see there are validator classes, but none of these allow me to "write back" the resultant XML(with defaults populated) so that I may use the "expanded" form in subsequent processing.
Thanks,
-a
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
The XML instance generator tool embedded in oXygen is able to generate an XML file from an XML Schema based on a set of user options. The tool is available from menu Tools -> Generate Sample XML Files and you can find details about it in the User Manual. It can also be executed from command line using the script xmlGenerator.bat (Windows) / xmlGenerator.sh (Unix) located in the oXygen install folder.
Regards,
Sorin
The XML instance generator tool embedded in oXygen is able to generate an XML file from an XML Schema based on a set of user options. The tool is available from menu Tools -> Generate Sample XML Files and you can find details about it in the User Manual. It can also be executed from command line using the script xmlGenerator.bat (Windows) / xmlGenerator.sh (Unix) located in the oXygen install folder.
Regards,
Sorin
Return to “General XML Questions”
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