Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsElement ordering in XML based on DTD
https://www.eclipse.org/forums/index.php/mv/msg/207519/664500/#msg_664500
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?]]>Greg Amerson2011-04-10T05:31:02-00:00Re: Element ordering in XML based on DTD
https://www.eclipse.org/forums/index.php/mv/msg/207519/664514/#msg_664514
https://bugs.eclipse.org/bugs/show_bug.cgi?id=342371
Also I've attempted to fix this locally. It seems to be working at least for my use-case with a DTD. I've attached the patch for feedback to the bug.]]>Greg Amerson2011-04-10T16:44:22-00:00Re: Element ordering in XML based on DTD
https://www.eclipse.org/forums/index.php/mv/msg/207519/664526/#msg_664526
I am glad to see that you are finding Sapphire useful. We do have support for automatically detecting correct insertion order. I have responded in the bug.