Skip attribute validation 2003-10-02 - By Michael Glavassevich
Hello,
You cannot skip attribute validation. If you've requested that an XML parser determine the validity [1] of a document it is required that it report validity constraints that are violated as errors. The requirement that all attributes included in the document must be declared [2] is one of these.
If your document isn't valid, the errors the parser reports aren't fatal, so if you can determine the context of the error (which I admit isn't easy given that there's no standard that I know of for reporting this information) you can ignore the error if you're not interested in it.
[1] http://www.w3.org/TR/REC-xml#dt-valid [2] http://www.w3.org/TR/REC-xml#ValueType
On Thu, 2 Oct 2003, P L wrote:
> > Hello, > > One of the elements in my XML file contains 4 attributes. I validate my XML file with a DTD. > > Now a requirement has come to skip validiting one of the attributes. I tried to remove the attribute declaration from DTD but xerces complains "Attribute must be declared for element type ...". I tried if any of the features ,properties available through DocumentBuilderFactory may fit but none of them allow skipping attribute validation. > > Any ideas on how to skip attribute validation ?. > > Thank you, > > > > --------------------------------- > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search
-------------------- Michael Glavassevich mrglavas@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|