2012-03-05 5 views
0

私はprevious questionにAVTについてお知らせしてくれてありがとうございます。Orbeon Xformsの属性 'id'にAVTを適用できます

私はAVTをすべての属性に適用できると思っていましたが、属性idでは機能していません。 I read W3C勧告では、AVTをすべての属性に適用することはできません。

これがOrbeon Xformsで動作するかどうかご連絡ください。

サンプルコード(サンドボックスでそれをプレイ!):

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" 
    xmlns:odt="http://orbeon.org/oxf/xml/datatypes" 
    xmlns:xi="http://www.w3.org/2001/XInclude" 
    xmlns:sql="http://orbeon.org/oxf/xml/sql" 
    xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" 
    xmlns:p="http://www.orbeon.com/oxf/pipeline" 
    xmlns:saxon="http://saxon.sf.net/" 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:oxf="http://www.orbeon.com/oxf/processors" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" 
    xmlns:exforms="http://www.exforms.org/exf/1-0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:fr="http://orbeon.org/oxf/xml/form-runner" 
    xmlns:ev="http://www.w3.org/2001/xml-events" 
    xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary" 
    xmlns:f="http://orbeon.org/oxf/xml/formatting" 
    xmlns:xforms="http://www.w3.org/2002/xforms" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:exf="http://www.exforms.org/exf/1-0" 
    xmlns:xbl="http://www.w3.org/ns/xbl" 
    xmlns:date="http://exslt.org/dates-and-times"> 

<xhtml:head> 
    <xhtml:title>Address Details</xhtml:title> 

    <xforms:model> 
    <xforms:instance id="address-details" xmlns=""> 
     <form> 
      <address> 
       <address-1></address-1> 
      </address> 
     </form> 
    </xforms:instance> 

    <xforms:bind id="address-1" nodeset="instance('address-details')/address/address-1" 
       readonly="false()" 
       constraint="string-length(.) &lt;= 15"/> 
    <xxforms:variable name="id-name" select="CONTROL-ID" /> 

    </xforms:model> 
</xhtml:head> 

<xhtml:body> 

    <table> 
     <tr> 
      <td> 
       Address 1: 
      </td> 
      <td> 
       <xforms:input bind="address-1" incremental="true" id="{$id-name}"> 
        <xforms:alert>Maximum allowed characters are 15</xforms:alert> 
       </xforms:input> 
      </td> 
     </tr> 
    </table> 

</xhtml:body> 

</xhtml:html> 

私たちは、AVTが解釈されていないことを示してHTMLソースを見ることができます。

AVT not interpreted for id attribute

私は、フォームのランナーは、id値に動的な名前を追加しますが、私にとっては罰金thatsのことを知っています。

これがOrbeon Xformsで動作するかどうかは、教えてください。

答えて

1

単純な答え:AVTはXForms要素のid属性では機能しません。 IDを静的に選択する必要があります。

+0

大変ありがとうございます。 – Jayy

関連する問題