Re: [Xsltforms-support] confusion over instance() function
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2009-07-31 09:03:38
|
Hello Stephen, > I have a bit of confusion over the instance() function, in > XSLForms it returns the root node of the instance, if this is the > specification then that is fine but it seems a bit counter-intuitive as > '/' and '//' have different meanings in XPath. > The XForms 1.1 proposed recommendation says : "this function returns a node-set containing just the root element node (also called the document element node) of the referenced instance data" (AJAXForms was wrong returning the document node (/)...). > If this is correct behaviour then the example from > http://www.w3schools.com/xforms/xforms_functions.asp(as below) is wrong. > > **** > instance(string) > > An XForms Model can contain more than one instance. This function > returns the root node of the specified instance data > > <xforms:instance id="orderform"> > <firstName>John</firstName> > </xforms:instance> > > ref="instance('orderform')/firstName" > > This example returns a node-set that consists of the firstName element > node from the instance named "orderform" > > **** > > Also in the W3C proposed recommendation : For instance data corresponding to this XML: <xforms:instance xmlns="" id="orderform"> <orderForm> <shipTo> <firstName>John</firstName> </shipTo> </orderForm> </xforms:instance> The following expression selects the |firstName| node. Note that the |instance| function returns an element node, effectively replacing the leftmost location step from the path: ref="instance('orderform')/shipTo/firstName" > As a matter of general interest, do you know of many people who have > used XSLForms in production as yet? > Mark Logic has developed an "Application Builder" application delivered with Mark Logic Server 4.1. All around the world, people are downloading and testing XSLTForms but, because it's free, I don't know who is using it in production. XForms is yet an emerging technology to be used in the promising XRX architecture. EMC has now its own engine named Formula but it seems that IBM is not working anymore on Ubiquity XForms project and I would not be surprised if this project is abandoned soon... XSLTForms is still the most mature of its kind !! Regards, -Alain |