When I try to loop through the files in a directory with this xquery

declare default element namespace "http://www.tei-c.org/ns/1.0";
for $text in collection('/Users/martin/Documents/xquery/teisamples/')
return $text/sourceDesc

I get this error message

SystemID: /Users/martin/Documents/xquery/teisamples/.DS_Store
Engine name: Saxon-PE XQuery
Severity: fatal
Description: Error reported by XML parser
Start location: 1:0

On How do I tell the processor to ignore files that are not xml. I had no luck with a node-name expression looking for node-name that ends with xml, but I suspect that the node-name does not identify the filename and that the error is higher or lower in the process. 

On Jun 14, 2010, at 6:46 AM, Michael Kay wrote:

Fwiw, I always thought the "free" version of Saxon was included with
the "paid for" version, and you would always get the free version
unless you explicitly asked for the commercial version... perhaps its
changed, or my memory is frazzled...

Generally that's the intent: if you load Saxon-EE code and you don't
have a license file then you fall back to Saxon-HE behaviour, and you
only get a failure once you try to use Saxon-EE-specific functionality.
But in the JAXP XPathFactory initializer, if you load an
EnterpriseXPathFactory it requests schema validation mode = lax, and
that's causing the failure; I think I was overlooking the fact that this
could happen unintentionally, merely by having the code on the
classpath. I'll aim to fix this.

Michael Kay

ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
saxon-help mailing list archived at http://saxon.markmail.org/