You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Qin Ding <qd...@csc.com> on 2003/09/10 22:11:36 UTC
validator dtd or schema
Here is my goal: validation.xml contains all the user-defined the
validation requirements for each bean and every fields for a given bean. In
a validation report, I need to list the requirements and the validation
results. To do that, I am thinking to use XML binding tool to create java
objects based on validation dtd or schema; and then I can populate the
generated java object using the validation.xml. After that, I can get the
rules for each bean from java to velocity report.
I use Sun's JAXB tool to build java objects based on validation_1_1.dtd.
However, when I tried to generate the java files, I got the error stating
that validation_1_1.dtd is not well-formed (first line).
Now, my questions:
(1) is validation_1_1.dtd the latest version? I saw in the common line I
need to use validator_1_0.dtd. So, I tried that file. I still got the same
error.
(2) does validation.xml have schema file (ie xsd file)? If so, where I can
get a copy of the schema?
(3) how does validator handling xml to java internally? Is there an easy
way to extract the rules from validation.xml?
Please advise me. Thank you very much.
Qin
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [validator] validator dtd or schema
Posted by David Graham <gr...@yahoo.com>.
--- Qin Ding <qd...@csc.com> wrote:
> Here is my goal: validation.xml contains all the user-defined the
> validation requirements for each bean and every fields for a given bean.
> In
> a validation report, I need to list the requirements and the validation
> results. To do that, I am thinking to use XML binding tool to create
> java
> objects based on validation dtd or schema; and then I can populate the
> generated java object using the validation.xml. After that, I can get
> the
> rules for each bean from java to velocity report.
>
> I use Sun's JAXB tool to build java objects based on validation_1_1.dtd.
> However, when I tried to generate the java files, I got the error
> stating
> that validation_1_1.dtd is not well-formed (first line).
>
> Now, my questions:
> (1) is validation_1_1.dtd the latest version?
Yes.
>I saw in the common line I
> need to use validator_1_0.dtd. So, I tried that file. I still got the
> same
> error.
> (2) does validation.xml have schema file (ie xsd file)?
No.
> If so, where I
> can
> get a copy of the schema?
> (3) how does validator handling xml to java internally? Is there an
> easy
> way to extract the rules from validation.xml?
Validator uses Commons Digester to turn validation.xml files into Java
objects. See the ValidatorResources constructor for an example.
David
>
> Please advise me. Thank you very much.
>
> Qin
>
>
>
----------------------------------------------------------------------------------------
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
> written
> agreement or government initiative expressly permitting the use of
> e-mail
> for such purpose.
>
----------------------------------------------------------------------------------------
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org