Need Saxon-SA? (was: Re: saxon-help Digest, Vol 26, Issue 18)

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Need Saxon-SA? (was: Re: saxon-help Digest, Vol 26, Issue 18)

by Sylvain Hallé-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Michael.  I wrote a URIResolver which passes whatever I want to the engine.

I downloaded an evaluation copy of Saxon-SA and a licence key in order to test
the (#saxon:stream#) functionality; I deleted my Saxon-B jars, replaced them
with those from saxonsa9-1-0-1j.zip and copied the licence file into my
classpath and restarted the whole thing to make sure the changes would be
noticed.  However I get the following when I run my test program:

   XPST0003: XQuery syntax error in #for $x in (#saxon:stream#) {#:
     To use saxon:stream, you need the Saxon-SA processor from
http://www.saxonica.com/

Besides, whether the licence file is present in the classpath or not does not
change the message.  Shouldn't I be told "License file saxon-license.lic not
found" if I remove the licence from the classpath?

I must have missed something obvious; does anyone know what that can be?

Sylvain

--- Original message ---

Date: Fri, 11 Jul 2008 18:12:30 +0100
From: "Michael Kay" <mike@...>
Subject: Re: [saxon] saxon-help Digest, Vol 26, Issue 18
To: "'Mailing list for the SAXON XSLT and XQuery processor'"
        <saxon-help@...>
Message-ID: <9AA132C547FF406881B5D680FF587985@Sealion>
Content-Type: text/plain; charset="us-ascii"

 > > Thanks.  However, I noticed in the documentation that this
 > > streaming facility is available for an expression that must
 > > start with doc() (i.e. it must read a file).  If I set my
 > > document context to another source (e.g. a character stream
 > > produced by another part of my code) using the bindDocument()
 > > method, is there a way to achieve the same result?

You can write a URIResolver that intercepts the call on doc() and returns a
StreamSource. But I don't think it can be made to work with the XQJ
bindDocument() method.

Michael Kay
http://www.saxonica.com/




--
Sylvain Hallé, finissant du doctorat / Ph.D. Candidate

Département d'informatique
Université du Québec à Montréal
C.P. 8888, Succ. Centre-ville
Montréal (Québec)
CANADA H3C 3P8

E-mail: shalle@...
Web:    www.leduotang.com/sylvain
Tel:    +1 (514) 987-4186
Fax:    +1 (514) 987-8477

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

Re: Need Saxon-SA? (was: Re: saxon-help Digest, Vol 26, Issue 18)

by Michael Kay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


If you're invoking Saxon from the command line, you need to use the -sa
option.

If you're invoking it from a Java API, you need to specify that you want the
SA processor when you start:

JAXP: instantiate com.saxonica.SchemaAwareTransformerFactory

native Saxon API: instantiate SchemaAwareConfiguration

s9api: new Processor(true).

Sorry about the inconvenience!

Michael Kay
Saxonica

> -----Original Message-----
> From: saxon-help-bounces@...
> [mailto:saxon-help-bounces@...] On Behalf
> Of Sylvain Hallé
> Sent: 17 July 2008 00:18
> To: saxon-help@...
> Subject: [saxon] Need Saxon-SA? (was: Re: saxon-help Digest,
> Vol 26, Issue 18)
>
> Thanks Michael.  I wrote a URIResolver which passes whatever
> I want to the engine.
>
> I downloaded an evaluation copy of Saxon-SA and a licence key
> in order to test the (#saxon:stream#) functionality; I
> deleted my Saxon-B jars, replaced them with those from
> saxonsa9-1-0-1j.zip and copied the licence file into my
> classpath and restarted the whole thing to make sure the
> changes would be noticed.  However I get the following when I
> run my test program:
>
>    XPST0003: XQuery syntax error in #for $x in (#saxon:stream#) {#:
>      To use saxon:stream, you need the Saxon-SA processor
> from http://www.saxonica.com/
>
> Besides, whether the licence file is present in the classpath
> or not does not change the message.  Shouldn't I be told
> "License file saxon-license.lic not found" if I remove the
> licence from the classpath?
>
> I must have missed something obvious; does anyone know what
> that can be?
>
> Sylvain
>
> --- Original message ---
>
> Date: Fri, 11 Jul 2008 18:12:30 +0100
> From: "Michael Kay" <mike@...>
> Subject: Re: [saxon] saxon-help Digest, Vol 26, Issue 18
> To: "'Mailing list for the SAXON XSLT and XQuery processor'"
> <saxon-help@...>
> Message-ID: <9AA132C547FF406881B5D680FF587985@Sealion>
> Content-Type: text/plain; charset="us-ascii"
>
>  > > Thanks.  However, I noticed in the documentation that
> this  > > streaming facility is available for an expression
> that must  > > start with doc() (i.e. it must read a file).  
> If I set my  > > document context to another source (e.g. a
> character stream  > > produced by another part of my code)
> using the bindDocument()  > > method, is there a way to
> achieve the same result?
>
> You can write a URIResolver that intercepts the call on doc()
> and returns a StreamSource. But I don't think it can be made
> to work with the XQJ
> bindDocument() method.
>
> Michael Kay
> http://www.saxonica.com/
>
>
>
>
> --
> Sylvain Hallé, finissant du doctorat / Ph.D. Candidate
>
> Département d'informatique
> Université du Québec à Montréal
> C.P. 8888, Succ. Centre-ville
> Montréal (Québec)
> CANADA H3C 3P8
>
> E-mail: shalle@...
> Web:    www.leduotang.com/sylvain
> Tel:    +1 (514) 987-4186
> Fax:    +1 (514) 987-8477
>
> --------------------------------------------------------------
> -----------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge Build the coolest Linux based
> applications with Moblin SDK & win great prizes Grand prize
> is a trip for two to an Open Source event anywhere in the
> world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> saxon-help mailing list archived at
> http://saxon.markmail.org/ saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 
LightInTheBox - Buy quality products at wholesale price