Jump to content

Getting default values in XSD for XML documents


Recommended Posts

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,

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...