Marko Asplund wrote:
i'm not sure whether i understood your code example entirely (i'm still a
Xerces novice) but i can't see how the code addresses that concern.

The default error reporter localizes the error messages, thus introducing the problem that you reported. My code removes the localization process and passes the original internal error codes to the application. Granted, it's still a String value but it does not contain any text that may have been localized, it passes all of the error information, and it is represented in an easily parseable format.

The format of the new error string is as follows:

  domain '#' key ( '\t' arg )*

The "domain" and "key" are the internal error codes used
within the Xerces2 parser to identify which error message
should be localized to report to the application. And the
remaining items are String equivalents of the replacement
text used in the localization process. The domain and key
are separated by a pound sign (#) and all of the fields
are separated by tabs (\t). For example: (I'm making this
up but if you run the code, you'll see what I mean)

  http://www.w3.org/REC/TR-xschema1#bad-elem    foo

So it should be very easy to parse and obtain the error
code. And the nice thing is that this will be the same
error code returned for that same document in every
locale.

If you don't like my choice of error string, then feel
free to rewrite the code to pass only the key String, for
example. Anything will work as long as it's not localized.

Does my explanation clear things up?

--
Andy Clark * [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to