You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Koziol, Jason" <ja...@sap.com> on 2000/06/14 18:45:42 UTC

Invalidating empty element and returning line and column number

Using Xerces c version 1.1, SAX Parser

I'm trying to validate an element as not being empty, and log information
about its specific location in the xml file. The contents of the element are
destined for a key text field in a table, and must therefore have some
content (but not necessarily unique).

I would like to avoid using attributes, unless they speak to this need
exactly. I have tried to use an ATTLIST store number ELEMENT #REQUIRED, and
while it appeared to exhibit the correct behavior, the error thrown had
incorrect line and column numbers.

Generally there seems to be a problem getting line and column information
out of Xerces, as the setLocator method and Locator class seem to be
non-functional, and the ReaderMgr, which does store the information, is
non-cooperative.

Am I missing something? Please help!!



Re: Invalidating empty element and returning line and column number

Posted by Dean Roddey <dr...@charmedquark.com>.
The locator is implemented in the most recent code, so it will work in the
upcoming release. But, the locator is really just the reader manager (which
implements the Locator interface.) The reader manager stuff obviously works,
since that's where all the line/col info comes from that are in any error
messages. What exactly do you feel is wrong?

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"You young, and you gotcha health. Whatchoo wanna job fer?"


----- Original Message -----
From: "Koziol, Jason" <ja...@sap.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, June 14, 2000 9:45 AM
Subject: Invalidating empty element and returning line and column number


> Using Xerces c version 1.1, SAX Parser
>
> I'm trying to validate an element as not being empty, and log information
> about its specific location in the xml file. The contents of the element
are
> destined for a key text field in a table, and must therefore have some
> content (but not necessarily unique).
>
> I would like to avoid using attributes, unless they speak to this need
> exactly. I have tried to use an ATTLIST store number ELEMENT #REQUIRED,
and
> while it appeared to exhibit the correct behavior, the error thrown had
> incorrect line and column numbers.
>
> Generally there seems to be a problem getting line and column information
> out of Xerces, as the setLocator method and Locator class seem to be
> non-functional, and the ReaderMgr, which does store the information, is
> non-cooperative.
>
> Am I missing something? Please help!!
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>