[Xsltforms-support] Adding optional elements to an XML document
Brought to you by:
alain-couthures
From: sores <so...@al...> - 2012-06-05 09:21:47
|
Hi All, When inserting new elements into an empty repeat the context attribute has to be used to define the insert location. By default the inserted element will be positioned after the last child of the context nodeset. Is there a way to control this behaviour? (for example an axis xpath attribute somewhere that would define the insertion point in the context node) I am trying to build web interfaces for fairly complex XSD schema defined objects with lots of optional elements. In an XML instance these optional elements may not be present. When someone starts to add them they appeare in a wrong location and make XSD validation fail. Having empty optional elements in the XML instances would work, but | wanted to avoid this. An easy way to solve the problem is reordering the elements with an xsl transformation. Before doing so I would like to know if I am missing something obvious. Best regards, László Sőrés |