No, not at the same time. I did not understand from your original
message that was what you were getting at (and I'm too novice to XML
validation to read between the lines :)).
What I meant was, the J2EE1.3 xml file has a DTD file specified in
DOCTYPE, the J2EE1.4 xml file has a no DTD file specified, but it does
have a schema (in xsi:schemaLocation of the first tag).
In the new XML schema some tags have moved, so the DTD based files
cannot be validated with the XML schema.
I cannot tell the parser whether the xml file needs DTD validation or
schema validation. So I want to turn on both DTD and schema validation
and make the parse pick.
I suppose that means I don't want both DTD and schema validation (for
each file), but for all my files I need both (not at the same time) ;)
It works now that I changed my application the way Michael said I
should, so I'm a happy and thankful camper.
Dies
Bob Foster wrote:
Dies Koper wrote:
Hello Bob,
> [DTD, schema] both DTD and schema validation.
>
> So, to be more precise, is the latter possibility one that anyone
wants?
I think everybody working with J2EE1.3 and J2EE1.4 needs both DTD and
schema validation
At the same time?
I've never seen a case where a schema-valid document wasn't also
DTD-valid (unless the document format changed). Sounds like twice the
work for the same result.
(as the DTD based deployment descriptors changed to schema based and
the filenames are unchanged).
That's odd. If you specify a SYSTEM location in DOCTYPE, it had better
be a DTD location. If you specify an xsi:schemaLocation, it had better
be the location of an XML Schema. The parser won't sort this out,
regardless of options.
Bob Foster
http://xmlbuddy.com/
Dies
Bob Foster wrote:
Michael Glavassevich wrote:
Bob Foster <[EMAIL PROTECTED]> wrote on 08/05/2005 11:12:07 AM:
Excuse me, but if you set the parser so it does DTD _and_ schema
validation, then the document must be both DTD-valid and schema valid?
Well, not exactly. With the dynamic validation feature turned on,
the document will only be DTD validated if it has a DTD. Similarly a
schema (more specifically an element declaration for the validation
root) must be found for schema validation to be performed. If the
document has both a DTD and schema it will be DTD validated and
schema validated. If it has neither then no validation is performed.
Sure, there are four possibilities:
[DTD, no schema] DTD validation only
[no DTD, schema] schema validation only
[no DTD, no schema] no validation
[DTD, schema] both DTD and schema validation.
So, to be more precise, is the latter possibility one that anyone wants?
It seems more likely in the latter case, what people would want is
closer to what
"http://xml.org/sax/features/external-general-entities" does.
Bob
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]