The environment I was talking about is a e-business messaging scenario
(this information should have been given in the first post, my
apologies).

Therefore it is not possible to add the extra rules to the appinfo
element because we can not expect every business partner to do so.
(The idea is elegant none the less, Paul)

What do you think about the idea of putting the extra semantics (see
classes 1. and 2.) into an XSLT file for each message and:
- first validate the message against the e-business standard schema, then
- processing the message using the corresponding XSLT file. 

The XSLT the file would (in my little world :-) produce warnings if
something was wrong. This could solve class 1. problems ("Can not be
(easily) described by Schema").

For the second problem however ("Is outside the reach of the parser")
I think a PSVI or SAX approach is feasible.

QUESTIONS:
1.) Do you think that the approach of using XSLT processing is faster
then standard SAX or DOM access in Xerces (concering class 1.)?
(Please keep in mind that performance can be a critical factor in
messaging systems)

2.) Is XSLT in your eyes expressive enough to do the job (tackle the
class 1. problems of both data range and element dependencies)

3.) Which is (in general) faster in Xerces: PSVI access, SAX access or
DOM access?

I am also thankful for new ideas!

Btw.: Thanks to Paul and Joseph for their contributions.

Kind Regards :-)

Gregor




2005/6/3, Biron,Paul V <[EMAIL PROTECTED]>:
> 
> 
> > -----Original Message----- 
> > From: Gregor [mailto:[EMAIL PROTECTED] 
> > Sent: Friday, June 03, 2005 12:16 PM 
> > To: [email protected] 
> > Subject: Validation User-Exits in Xerces 
> > 
> > QUESTION: 
> > 1.) Does Xerces support somekind of software mechanism (user 
> > exits) that make it possible to execute custom software 
> > during validation? (Does such an approach make sense?) 
> > 
> > 2.) Do you have any other ideas on how to tackle 1. & 2. ?? 
> > (PSVI, XSLT are being discussed in our team) 
> 
> sounds like appinfo is what you're looking for.  You can put any kind of
> "extra-validation" you want in an appinfo attached to some
> element/attribute/type.  Then after validation, have your application walk
> the PSVI and "fire" any of the "extra-validation" steps in any appinfo's it
> finds.
> 
> Note, this is a typical use of schematron...where the schematron processor
> serves as "your application" in the paragraph above.
> 
> pvb 
Hi there :-)

PROLOG:
We need validation features that are outside the realm of XML Schema.

Two classes of extra validation features need to be tackled.

1.) "Can not be (easily) described by Schema"

- a XML vocabulary specifies a change date. In our solution, we want
to make sure that there is not any date between 01.01.0001 and
09.09.9999 but a date between last week and today.
- a XML Schema defines several elements, however it does not define
some semantic stuff (value of element a + value of element b = value
of elment c)

2.) "Is outside the reach of the parser"

Apart from Schema specified code lists, it sometimes makes sense to
have codelists in a database (e.g. a message arrives that specifies a
customer number and we want to check very early in the process, wheter
the customer number is in our database)

QUESTION:
1.) Does Xerces support somekind of software mechanism (user exits)
that make it possible to execute custom software during validation?
(Does such an approach make sense?)

2.) Do you have any other ideas on how to tackle 1. & 2. ?? (PSVI,
XSLT are being discussed in our team)

Thank you very much for your thoughts and have a nice weekend.

Kind Regards,

Gregor

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

Reply via email to