2

E org.apache.commons.digester.Digester エラー 行 196 列 12 の解析エラー: 要素型 "field" の内容は "(msg|arg0|arg1|arg2|arg3|var) " と一致する必要があります。org.xml.sax.SAXParseException: 要素型 "field" の内容は "(msg|arg0|arg1|arg2|arg3|var) " と一致する必要があります。

私のXMLコードは

<formset>
    <form name="groupCommForm">

        <field property="groupId" depends="required">
            <arg position="0" key="group.overCap.groupId"/>
        </field>

        <field property="subGroupId" depends="required">
            <arg position="0" key="group.overCap.subgroupId"/>
        </field>

        <field property="productCat" depends="required">
            <arg position="0" key="group.overCap.prodInd"/>
        </field>

        <field property="effDate" depends="required, date">
            <arg position="0" key="group.overCap.effDate"/>
            <var>
                <var-name>datePattern</var-name>
                <var-value>MM/dd/yyyy</var-value>
            </var>                        
        </field>

        <field property="termDate" depends="required, date">
            <arg position="0" key="group.overCap.termDate"/>
            <var>
                <var-name>datePattern</var-name>
                <var-value>MM/dd/yyyy</var-value>
            </var>                       
        </field>

        <field property="commType" depends="required">
            <arg position="0" key="group.overCap.commTyp"/>
        </field>

        <field property="changeReason" depends="required, maxlength">
            <arg position="0" key="group.overCap.comment"/>
            <arg position="1" name="maxlength" key="${var:maxlength}" resource="false"/>
            <var><var-name>maxlength</var-name><var-value>255</var-value></var>     
        </field>

    </form>

    <form name="asoForm">

        <field property="groupId" depends="required">
            <arg position="0" key="group.aso.groupId"/>
        </field>

        <field property="hlthDentInd" depends="required">
            <arg position="0" key="group.aso.hTDentInd"/>
        </field>

        <field property="subScriberCount" depends="required, integer">
            <arg position="0" key="group.aso.subscribCt"/>
        </field>

        <field property="premiumAmount" depends="required, float">
            <arg position="0" key="group.aso.premAmt"/>
        </field>

        <field property="dependnetCount" depends="integer">
            <arg position="0" key="group.aso.premAmt"/>
        </field>

        <field property="dueDate" depends="required, date">
            <arg position="0" key="group.aso.dueDate"/>
            <var>
                <var-name>datePattern</var-name>
                <var-value>MM/dd/yyyy</var-value>
            </var> 
        </field>

        <field property="changeReason" depends="required, maxlength">
            <arg position="0" key="group.comm.comment"/>
            <arg position="1" name="maxlength" key="${var:maxlength}" resource="false"/>
            <var><var-name>maxlength</var-name><var-value>255</var-value></var> 
        </field>

        <field property="asfProcCode" depends="required">
            <arg position="0" key="group.comm.asf"/>
        </field>

        <field property="bmProcCode" depends="required">
            <arg position="0" key="group.comm.bm"/>
        </field>

        <field property="commProcCode" depends="required">
            <arg position="0" key="group.comm.comm"/>
        </field>

    </form>

    <form name="otherAdjForm">

        <field property="groupId" depends="required">
            <arg position="0" key="group.otherAdj.groupId"/>
        </field>

        <field property="subGroupId" depends="required">
            <arg position="0" key="group.otherAdj.subgroupId"/>
        </field>

        <field property="productCat" depends="required">
            <arg position="0" key="group.otherAdj.prodCat"/>
        </field>

        <field property="productInd" depends="required">
            <arg position="0" key="group.otherAdj.prodInd"/>
        </field>

        <field property="compMonth" depends="required, date">
            <arg position="0" key="group.otherAdj.compMonth"/>
            <var>
                <var-name>datePattern</var-name>
                <var-value>MM/dd/yyyy</var-value>
            </var> 
        </field>

        <field property="dueDate" depends="required, date">
            <arg position="0" key="group.otherAdj.dueDate"/>
            <var>
                <var-name>datePattern</var-name>
                <var-value>MM/dd/yyyy</var-value>
            </var> 
        </field>

        <field property="premium" depends="required, float">
            <arg position="0" key="group.otherAdj.premAmt"/>
        </field>

        <field property="commissions" depends="required, float">
            <arg position="0" key="group.otherAdj.comms"/>
        </field>

        <field property="asfProcCode" depends="required">
            <arg position="0" key="group.comm.asf"/>
        </field>

        <field property="bmProcCode" depends="required">
            <arg position="0" key="group.comm.bm"/>
        </field>

        <field property="commProcCode" depends="required">
            <arg position="0" key="group.comm.comm"/>
        </field>

        <field property="changeReason" depends="required, maxlength">
            <arg position="0" key="group.comm.comment"/>
            <arg position="1" name="maxlength" key="${var:maxlength}" resource="false"/>
            <var><var-name>maxlength</var-name><var-value>255</var-value></var> 
        </field>

    </form>

    <form name="premEquiForm">

        <field property="groupId" depends="required">
            <arg position="0" key="group.premEqui.groupId"/>
        </field>

        <field property="subGroupId" depends="required">
            <arg position="0" key="group.premEqui.subgroupId"/>
        </field>

        <field property="productCat" depends="required">
            <arg position="0" key="group.premEqui.prodInd"/>
        </field>

        <field property="startDate" depends="required, date">
            <arg position="0" key="group.premEqui.startDate"/>
            <var>
                <var-name>datePattern</var-name>
                <var-value>MM/dd/yyyy</var-value>
            </var>
        </field>

        <field property="termDate" depends="required, date">
            <arg position="0" key="group.premEqui.termDate"/>
            <var>
                <var-name>datePattern</var-name>
                <var-value>MM/dd/yyyy</var-value>
            </var>
        </field>

        <field property="monthlyPremEquiAmt" depends="required, float">
            <arg position="0" key="group.premEqui.mnthlyPrem"/>
        </field>

        <field property="monthlyAccessFeeAmt" depends="required, float">
            <arg position="0" key="group.premEqui.mnthlyFee"/>
        </field>                    

        <field property="asfProcCode" depends="required">
            <arg position="0" key="group.comm.asf"/>
        </field>

        <field property="bmProcCode" depends="required">
            <arg position="0" key="group.comm.bm"/>
        </field>

        <field property="commProcCode" depends="required">
            <arg position="0" key="group.comm.comm"/>
        </field>

        <field property="changeReason" depends="required, maxlength">
            <arg position="0" key="group.comm.comment"/>
            <arg position="1" name="maxlength" key="${var:maxlength}" resource="false"/>
            <var><var-name>maxlength</var-name><var-value>255</var-value></var> 
        </field>

    </form>

    <form name="usableForm">

        <field property="groupId" depends="required">
            <arg position="0" key="group.usable.groupId"/>
        </field>

        <field property="subGroupId" depends="required">
            <arg position="0" key="group.usable.subgroupId"/>
        </field>

        <field property="lifeDentInd" depends="required">
            <arg position="0" key="group.usable.lifeDentInd"/>
        </field>

        <field property="productInd" depends="required">
            <arg position="0" key="group.usable.prodInd"/>
        </field>

        <field property="methodologyType" depends="required">
            <arg position="0" key="group.usable.methType"/>
        </field>

        <field property="subScriberCount" depends="required, integer">
            <arg position="0" key="group.usable.subscribCt"/>
        </field>

        <field property="dependnetCount" depends="integer">
            <arg position="0" key="group.usable.depenCt"/>
        </field>

        <field property="dueDate" depends="required, date">
            <arg position="0" key="group.usable.dueDate"/>
            <var>
                <var-name>datePattern</var-name>
                <var-value>MM/dd/yyyy</var-value>
            </var>
        </field>

        <field property="premiumCashAmt" depends="required, float">
            <arg position="0" key="group.usable.premAmt"/>
        </field>

        <field property="asfProcCode" depends="required">
            <arg position="0" key="group.comm.asf"/>
        </field>

        <field property="bmProcCode" depends="required">
            <arg position="0" key="group.comm.bm"/>
        </field>

        <field property="commProcCode" depends="required">
            <arg position="0" key="group.comm.comm"/>
        </field>

        <field property="changeReason" depends="required, maxlength">
            <arg position="0" key="group.comm.comment"/>
            <arg position="1" name="maxlength" key="${var:maxlength}" resource="false"/>
            <var><var-name>maxlength</var-name><var-value>255</var-value></var> 
        </field>

    </form>

</formset>

4

1 に答える 1

0

ストラットを使用していると思いますか?そうである場合は、最も単純な例 ( https://www.owasp.org/index.php/Struts_Validation_in_validator.xml_using_an_ActionFormのようなもの) を試してから、必要に応じてフィールドを追加し、どの時点で取得するかを確認してください。パーサー例外。

とにかく、要素を使用することはできず、むしろ使用する必要がある複数を使用することはできません

<arg0>
<arg1>

ただより

<arg>
<arg>
于 2014-02-17T11:42:14.973 に答える