[jdom-interest] How to sort a JDOM tree to simplify it's validation by XSD schema
olivier.coppel at akazi.com
Thu Sep 12 02:32:52 PDT 2002
Our application built a JDOM tree but elements are unordered. The only way
to validate with xsd an unordered sequence of elements is to use "xsd:all"
tag. But problem is that that I want to ignore some elements that don't
belong to our namespace. In xsd, it's corrsponding to "xsd:any" tag. But
it's IMPOSSIBLE to use "xsd:any" in "xsd:all" tag.
Here is an example of JDOM tree that I want to validate with xsd (elements
are unordered and elemetns from gui namesapce must be ignored) :
<?xml version="1.0" encoding="ISO-8859-1"?>
So I think that the best way to validate my JDOM tree is to sort it to be
able to use "xsd:sequence" tag in my schema.
My question : is there a way to build an ordered JDOM tree ? or is there a
way to sort a JDOM tree before saving it ?
mailto:olivier.coppel at akazi.com
More information about the jdom-interest