Re: [Xsltforms-support] Bind to an attribute within a repeat
Brought to you by:
alain-couthures
From: Stephen C. <ste...@gm...> - 2013-01-09 21:38:34
|
Hi, It should be a @nodeset attribute on the repeat not a @ref. On Thu, Jan 10, 2013 at 3:39 AM, Elias Mazur <eli...@gm...> wrote: > <?xml-stylesheet href="../xsltforms/xsltforms.xsl" type="text/xsl"?> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf=" > http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema > "> > <head> > <title>Test XForms</title> > <xf:model> > <xf:instance id="my"> > <data xmlns=""> > <Elem1> > <id seq="1">1</id> > </Elem1> > <Elem1> > <id seq="2">2</id> > </Elem1> > </data> > </xf:instance> > <xf:bind nodeset="instance('my')/Elem1/id@seq" type="xsd:integer"/> > </xf:model> > </head> > <body> > <p>Testing....</p> > <xf:repeat id="rep" ref="instance('my')/Elem1"> > <xf:input id="seqnum" ref="./id@seq"> > <xf:label>Seq: </xf:label> > <xf:alert>Must be integer</xf:alert> > </xf:input> > <br/> > <xf:input id="theid" ref="./id"> > <xf:label>Id: </xf:label> > </xf:input> > <br/><br/> > </xf:repeat> > </body> > </html> > |