Re: [Xsltforms-support] Adding optional elements to an XML document
Brought to you by:
alain-couthures
From: Ihe O. <ihe...@go...> - 2012-06-05 09:29:16
|
In your position I would explore using xsd:all instead of xsd:sequence so that the elements can appear in any order in the instance or switch to a relax schema or xsd 1.1 and use interleave. Operative word in the above being explore. Someone who has tried it may advise otherwise. On Tue, Jun 5, 2012 at 10:21 AM, sores <so...@al...> wrote: > 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 > > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |