Andrew Petro wrote:
How about we give the documents that are presently generating WARNings
because they do not validate -- cannot be validated -- schemas so that
they can be validated?
Andrew,
I see it this way: there's a 3-arg version of getResourceAsDocument()
that allows clients to choose validating or non-validating. So at the
end of the day you can use ResourceLoader to read any document with or
without validation as your needs dictate.
The question is what should happen with the 2-arg version... what should
be the *default* behavior: validating or no?
I'd say non-validating is a more natural default. I can't think of any
general-purpose XML-parsing libraries that validate by default. DOM
implementations, dom4j, etc -- you have to explicitly tell them to
validate if you want it.
And with ResourceLoader we're talking about a general-purpose utility.
ResourceLoader doesn't have any intimate knowledge of any of the files
it handles afaik.
If you were browsing the methods of ResourceLoader in an IDE and you saw
these 2 overloads:
- getResourceAsDocument (Class requestingClass, String resource)
- getResourceAsDocument (Class requestingClass, String resource,
boolean validate)
What would you guess would be the behavior of the 2-arg version? If I
was guessing, I'd definitely expect non-validating.
If we changed the 2-arg version so it doesn't validate, we could update
the classes that invoke getResourceAsDocument() to call the 3-arg
version and request validation where appropriate.
I have time to do that. I don't think I have the bandwidth to create
new schema just now.
drew wills
--
Andrew Wills
UNICON, Inc.
Office: (480) 558-2476
http://code.google.com/p/cernunnos/
--
You are currently subscribed to [email protected] as: [EMAIL
PROTECTED]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/uportal-dev