|Element ordering in XML based on DTD [message #664500]
||Sun, 10 April 2011 05:31
| Greg Amerson
Registered: March 2010
First off, bravo on sapphire. I've been using it for a day or two and I've already got a working editor for my XML file. But I've run into an issue and wanted to see if anyone knows how I could address it.
My particular XML file is just backed by a DTD. A dtd that requires a particular order for child elements. So with my sapphire editor there are element nodes that have multiple child-element types that can be specified
In this particular DTD child1 elements must come before child2 elements, so in the DTD its specified
<!ELEMENT parent (child1+, child2+)>
The problem I'm having is that in sapphire based editor when I remove all of the child1 elements in the list, and then add them again, they are appened to the <parent> node instead of being inserted before <child2/>
Is there a way that I can hook into the DOM insertion method of sapphire's model to enforce the DTD's ordering?
[Updated on: Sun, 10 April 2011 05:33]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02465 seconds