You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Santi <sa...@aqs.es> on 2000/06/22 14:37:09 UTC

Battery test for Schema Validation in Xerces (basically datatypes support)

I have developed a test battery class to track the XML Schema support
evolution in Xerces releases. I'm using Xerces intensively, that's why I
need to know its up to date capabilities [and current but not future
limitations ;-) ].
I don't know if a report of my tests with Xerces (21/06/00) CVS sources
would be of your interest. Below is the report table of contents. File with
results is about 55K long. So, I'll wait your approval to send it to the
list or any way I'll just send it to anyone interested.

Tests for Xerces
----------------
* Datatypes support tested for:
 - Binary
 - boolean
 - decimal
 - byte
 - double
 - float
 - string
 - recurringDuration
 - timeDuration
 - uriReference
 - date
(Including enumeration, minExclusive, maxExclusive, minInclusive and
maxExclusive facets support checking where allowed)
* minOccurs & maxOccurs support for element
* use support for attributes

Thanks,
    Santi.


Re: DTD and schemas

Posted by Norman Walsh <nd...@nwalsh.com>.
/ Frederick R�egger <ru...@perspectives.ch> was heard to say:
| My hope that Schema could replace DTDs, so that DTDs could be dropped
| alltogether might be just an illusion:

Maybe. But I am confident that the notion that dropping DTDs would
eliminate 9/10's of the complexity of processors is an illusion.

| all Schema samples I've seen end up referring  to a DTD, somewhere.

Really? I've seen lots of examples that don't require a DTD.

| What good is Schema (and X-data for that matter) then ?

Moving the schema definition language into XML is perceived to have a
number of advantages: it makes schema amenable to XML processing, it
is an opportunity to increase the power of schema (through facilities
like extension and restriction, equivalence classes, and strong
datatyping), and it allows an implementor to (eventually) drop support
for a non-XML syntax. There are surely other reasons as well.

| - Can DTD be replaced by Schemas, so that validation would be part of an
| application, rather than part of an XML-processors ?

You don't need to eliminate DTDs, or invent Schemas, to move validation
into an application. You can do that right now. Do a non-validating
parse of the document and write an application that does validation
through any means necessary.

But that's a pretty poor general solution. I want to describe
validation constraints in some standard way and write the application
that does validation exactly once. In order to achieve that, I need a
standard form for expressing the validation constraints. I am not
personally opposed to DTDs, though I recognize that many people are,
but XML Schema seem like a better long term answer at this point.

As to your specific question of whether or not Schemas can replace
DTDs, the answer is yes and no. You can express structural and
datatype constraints in a schema, but what you can't do is define
entities. So you can't define named character entities (&eacute;) or
general entities (&myaddress;) or external enties (&chapter1.xml;).

The XML Schema processor, unfortunately, arrives on the scene too late
to reasonably provide these features (it operates on Infosets which
have to be constructed by the parser and contain only the expansion of
all entity references). So, if you need entities, you need a DTD, even
if all it contains are entity declarations.

I can't think of any other features, off the top of my head, that you
can't get with XML Schema, but I don't promise that there aren't any :-).

|   (this would immensely simplify all tasks around xml-processors, validation
| would be a separate software layer, to be tested as such).

Validation can already be pushed off to a separate layer, if desired.

| - Would Sun's (and James Clark's) canonical forms help defining a mini-xml spec
| upon which to base further processing specs?

If you make an XML subset that doesn't include entities, I think you
could eliminate DTDs.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <nd...@nwalsh.com> | Wisdom is only a comparitive quality,
http://nwalsh.com/            | it will not bear a single
                              | definition.--Marquess of Halifax

Re: DTD and schemas

Posted by Frederick Rüegger <ru...@perspectives.ch>.
Hi, this might be a little too far away from xerces specifics  for this forum.
If so, then I'd like to apologize in advance.
I'm growing increasingly confused about DTD vs. Schema.
Looking at the XML spec and running an xml processor through the Oasis test
suite, I realized that about nine tenth of
the complexity of a processor lie in DTD processing (not necessarily for
validation, non validating parsers need to read the internal
subset, too).
My hope that Schema could replace DTDs, so that DTDs could be dropped
alltogether might be just an illusion:
all Schema samples I've seen end up referring  to a DTD, somewhere.

What good is Schema (and X-data for that matter) then ?

Ultimately  my question is :

- Can DTD be replaced by Schemas, so that validation would be part of an
application, rather than part of an XML-processors ?
  (this would immensely simplify all tasks around xml-processors, validation
would be a separate software layer, to be tested as such).

- Would Sun's (and James Clark's) canonical forms help defining a mini-xml spec
upon which to base further processing specs?

Thank you all in advance

Frederick J. Ruegger


Re: Battery test for Schema Validation in Xerces (basically datatypes support)

Posted by ma...@lutris.com.
How about donating the tests to the apache folks?   The lack of any
real test suite is one of Xerces biggest weaknesses.  This sounds
like a good start.

Mark

Santi <sa...@aqs.es> writes:
> I have developed a test battery class to track the XML Schema support
> evolution in Xerces releases. I'm using Xerces intensively, that's why I
> need to know its up to date capabilities [and current but not future
> limitations ;-) ].
> I don't know if a report of my tests with Xerces (21/06/00) CVS sources
> would be of your interest. Below is the report table of contents. File with
> results is about 55K long. So, I'll wait your approval to send it to the
> list or any way I'll just send it to anyone interested.
> 
> Tests for Xerces
> ----------------
> * Datatypes support tested for:
>  - Binary
>  - boolean
>  - decimal
>  - byte
>  - double
>  - float
>  - string
>  - recurringDuration
>  - timeDuration
>  - uriReference
>  - date
> (Including enumeration, minExclusive, maxExclusive, minInclusive and
> maxExclusive facets support checking where allowed)
> * minOccurs & maxOccurs support for element
> * use support for attributes
> 
> Thanks,
>     Santi.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

Re: Battery test for Schema Validation in Xerces (basically datatypes support)

Posted by Mike Pogue <mp...@apache.org>.
Yes, there's definite interest!  The more tests we have, the better!

Mike

Santi wrote:
> 
> The test are based in the construction of a correct instance and a bad
> instance.
> For each test you can see the schema, THE PARSER OUTPUT, and the XML
> instance. The tests are Ok if we obtain an empty parser output for correct
> instances and errors for incorrect instances.
>    I wait for your comments, Santi.
> 
> -----Mensaje original-----
> De: Jean-Louis Vila [mailto:jlvila@cosmosbay.com]
> Enviado el: jueves 22 de junio de 2000 15:22
> Para: xerces-j-dev@xml.apache.org
> Asunto: RE: Battery test for Schema Validation in Xerces (basically
> datatypes support)
> 
> Hi Santi,
> 
> I will be very interested to receive your test about Xerces.
> Thanks in advance,
> Jean-Louis Vila
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

RE: Battery test for Schema Validation in Xerces (basically datatypes support)

Posted by Santi <sa...@aqs.es>.
Hi,
I have finished the next release of the Schema Validation tests. Now the
output more estructured (XML).
I hope it results useful for the Xerces Project.

  Santiago Perez Campos.
Advanced Quality Solutions
       www.aqs.es

RE: Battery test for Schema Validation in Xerces (basically datatypes support)

Posted by Santi <sa...@aqs.es>.
The test are based in the construction of a correct instance and a bad
instance.
For each test you can see the schema, THE PARSER OUTPUT, and the XML
instance. The tests are Ok if we obtain an empty parser output for correct
instances and errors for incorrect instances.
   I wait for your comments, Santi.

-----Mensaje original-----
De: Jean-Louis Vila [mailto:jlvila@cosmosbay.com]
Enviado el: jueves 22 de junio de 2000 15:22
Para: xerces-j-dev@xml.apache.org
Asunto: RE: Battery test for Schema Validation in Xerces (basically
datatypes support)


Hi Santi,

I will be very interested to receive your test about Xerces.
Thanks in advance,
Jean-Louis Vila



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


RE: Battery test for Schema Validation in Xerces (basically datatypes support)

Posted by Jean-Louis Vila <jl...@cosmosbay.com>.
Hi Santi,

I will be very interested to receive your test about Xerces.
Thanks in advance,
Jean-Louis Vila