Dear Clay,

-----Original Message-----
From: Johnson, Clay [mailto:[EMAIL PROTECTED]]
Sent: Montag, 11. Juni 2001 21:50
To: Log4j-User@Jakarta. Apache. Org (E-mail)
Subject: DOM configuration (back to) basics


Folks, 

I've been using DOM configurator for months without a problem.  Suddenly, I
can't make it do what I want.  Before I delve into my specific problem, can
we review a couple questions/answers I've seen discussed in the past.

1. Validation

Awhile back someone posted a way to suppress validation by removing the
DOCTYPE tag and namespace.  This was a quick and simple way to avoid sax
warnings about no error handler, which although harmless, are nonetheless
unpleasant.  At the time, I tried it and it worked.  Now I can't get it to
work again; if I remove the DOCTYPE and log4j namespace, I get log4j error
about the "configuration" element (no namespace) not existing.  If I remove
only the DOCTYPE but leave the namespace, it works, but the sax warnings are
still there.  What's the story behind validation, and what's the prefered
action to avoid sax warnings?
>>>As already mentioned in earlier e-mails, removing of the DOCTYPE causes
that your document might be well-formed, but not valid. The validation can
only work against a DTD or XML-schema.

2. Order subelements

The log4j.dtd specifies an order for subelements:

        <!ELEMENT logj:configuration (renderer*, appender*,category*,root?)>

which I recall mentioned in response to a problem where the order wasn't
obeyed.  However, I seem to able to put subelements in any order, and it has
always worked.  I confused; is there an order required or not?  If so, why
does it work when I disobey it?

>>> If you removed the doctype (DTD reference), you can order your child
elements in any order, because the order is not checked at all. If you
include the doctype, but the order is still not obeyed, you might have
choosen an NON-validating SAX-parser!?
Please check you XML Document against a validating tool, like
InternetExplorer 5.x or XML Spy or similiar.

Thilo

---------------------------------------------------------------------
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]

Reply via email to