[Xsltforms-support] bind/@readonly turns into HTML4 @disabled="" instead of @readonly="readonly"
Brought to you by:
alain-couthures
From: Klotz, L. <Lei...@xe...> - 2010-04-29 23:19:58
|
If you do bind textarea to a readonly input field, it transforms into <... disabled="">... You cannot then select and copy the text. I believe it should use readonly instead of disabled, and also use the XHTML-specified value for the attribute: ...readonly="readonly">... <?xml version="1.0"?> <?xml-stylesheet href="//xsltforms/xsltforms.xsl" type="text/xsl"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <head> <model xmlns="http://www.w3.org/2002/xforms"> <instance> <data xmlns=""> <test1>abc def</test1> <test2>abc def</test2> </data> </instance> <bind nodeset="test1" readonly="true()" /> <bind nodeset="test2" relevant="false()" /> </model> </head> <body> <h1>Test</h1> <group xmlns="http://www.w3.org/2002/xforms"> <textarea ref="test1"> <label>Readonly Test</label> </textarea> <textarea ref="test2"> <label>Relevant Test</label> </textarea> </group> </body> </html> |