Sorry, I didn’t form my question clearly. Specifically what I found was match pattern like


element(*, d:product-type)


does not match an element whose type is d:product-type unless a –val option is used on the command line.


That’s what’s in the simple test files I attached.


I think from what you’ve said that’s to be expected, if I don’t validate the input then there is no type information for XSLT to use.






From: Michael Kay []
Sent: Wednesday, April 24, 2013 9:19 AM
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] .net transform.exe schema aware



You're confusing two things: the stylesheet being schema-aware, and the source document being validated. It's quite possible to have a schema-aware transformation with an untyped/unvalidated source document. For example, I often do validation of the result document only. Being "schema-aware" means that the stylesheet is capable of handling typed data, but does not automatically mean that all source documents are validated.


On the other hand, if the source document is validated then you probably want the stylesheet to be schema-aware, so -val switches schema-awareness on.


The -sa option is a bit of a legacy. At one time it meant "enable all Saxon-SA features". Today it's very rarely needed.


We could possibly have designed this differently and more intuitively, but I fear that any change now would only cause greater confusion.


Michael Kay




On 24 Apr 2013, at 14:06, Daniel Sullivan wrote:

I’ve found that the .NET transform utility for saxon-ee will not do a schema-aware transform unless a –val option is used. Even if –sa is added to the command line the .NET transform.exe does not do a schema aware transform. However if I use either –val:strict or –val:lax then whether or not I use –sa, transform.exe does a schema aware transform.


My understanding was that as long as the stylesheet included an import-schema element that .NET transform.exe would be schema aware, but that doesn’t seem to be the case.


I’ve added the simple files I used to test this out. When schema aware processing is done I expect “found it” to be the result of the transform.


In any case –val works, but maybe the doc’s could say required instead of optional.


I don’t know if this rates as being a bug or an operator malfunction, but I thought I would pass it along.




Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt!
saxon-help mailing list archived at