On Mon, 23 Apr 2007, David Carver <[EMAIL PROTECTED]> wrote:
>> Note that I don't like the XMLUnit with lots of statics API myself
>> either.  I opted for API consistency when I added new things for
>> the 1.1 release, but I plan to experiment with a different approach
>> for XMLUnit 2.0.  Your input is and will be more than welcome.
>
> Well, it seems that if you use the XMLUnit.setNamespaceContext, it
> will carry across when it gets the XPath engine.

It is supposed to 8-)

> I haven't taken a look yet, but is there a way to specify which
> XPath engine to use, as we can with the SAX and DOM parsers?

No.  XMLUnit will pick whatever XPathFactory returns and fall back to
SimpleXpathEngine pre-JAXP-1.3.

I don't think there is a system property to choose a factory or is
there?

> It would be nice to be able to specify either JAXEN, XALAN, or
> SAXON's xpath engines.  Particularly if you are trying to verify
> that something works across the various XPath engines available.

I see.

The primary use case is that you want to verify a piece of XML by
testing the results of some given XPath expressions.  What you
describe is testing an XPath expression by applying it to a given
document.  So in your case the expression and not the document would
be under test, right?  I can see how being able to pick a XPath
implementation might be useful here, agreed.  I'll look into it.

> Also, there was mention of schema validation.   Is this just
> validating an xml instance, or is this validating the xml schema it
> self?

Validating the instance, though I must admit that I'm not sure what
you mean by validating the Schema itself.

<http://xmlunit.sourceforge.net/userguide/html/ar01s04.html#XML%20Schema%20Validation>

Stefan

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Xmlunit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmlunit-general

Reply via email to