I think you can do something like this:

<!ELEMENT var-name (datePattern| min | max | maxLenght)>

Don't know exact syntax though unfortunately:).


-----Original Message-----
From: Robert Lamping [mailto:[EMAIL PROTECTED] 
Sent: October 31, 2003 4:09 PM
To: Struts Users Mailing List
Subject: dtd check on validation.xml: date pattern


I made a stupid mistake. I intended to validate a date and entered the
following

            <field property="datumIngediend"
                            depends="required, date">
                <arg0 key="aanvraagForm.datumingediend.toonnaam"/>
                <var>
                        <var-name>Pattern</var-name>
                        <var-value>dd-MM-yyyy</var-value>
                </var>
            </field>

On one machine this worked, as the DateFormat.SHORT format was obviously the
one I intended.
But at my laptop fortunately this didn't work, so I found the error. 

"Pattern" of course should be datePattern or datePatternStrict.

I tried to check the validation.xml with the dtd by adding the dtd to the
XML file and placing the dtd-file in the same directory as the
validation.xml.
With a XML plugin for Eclipse I can validate the 

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
          "validation_1_1.dtd">

I would like to limit var-name to certain values. Like datePattern, min,
max, maxLenght etc. 
As I don't know enough about DTDs, my question is: how do I built in such a
dtd-check?

Kind regards,

Robert Lamping
The Netherlands


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to