Hi Andrew,

Agree with your simplification.

I had some different content in there originally that I pulled out to make the example smaller.

thanks for the help


"Andrew Welch" <andrew.j.welch@gmail.com>
Envoyé par : saxon-help-bounces@lists.sourceforge.net

06/24/2008 05:40 PM
Veuillez répondre à
Mailing list for the SAXON XSLT and XQuery processor     <saxon-help@lists.sourceforge.net>

"Mailing list for the SAXON XSLT and XQuery processor" <saxon-help@lists.sourceforge.net>
Re: [saxon] the dreaded XPDY0002: "context item is undefined"

2008/6/24 Priscilla Walmsley <pwalmsley-lists@datypic.com>:
> Hi,
> It is interpreting "false" and "true" as element names (and hence looking
> for a context for them).  To do what you want, try:
> <xsl:sequence select="xs:boolean(false())" />
> or just
> <xsl:sequence select="false()" />

Just to add to that, you can replace:

 <xsl:when test="$f:sheetCount lt 1" >
   <xsl:sequence select="false()" />
 <xsl:otherwise >
   <xsl:sequence select="true()" />


<xsl:sequence select="if ($f:sheetCount lt 1) then false() else true()"/>

which is the same as:

<xsl:sequence select="$f:sheetCount ge 1"/>

...isn't it?

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
saxon-help mailing list archived at http://saxon.markmail.org/

Ce message a ete transmis par Internet. Son emetteur peut ne pas etre
l'emetteur annonce. Son contenu et toute piece jointe peuvent ne pas etre exacts.
This message originated from the Internet. Its originator may or may not be who they claim to be and information contained in the message and any attachments may or may not be accurate.

Ensemble adoptons des gestes responsables : N'imprimez ce mail que si necessaire.


Les informations contenues dans ce message et les pieces jointes (ci-apres denomme le message) sont confidentielles et peuvent etre couvertes par le secret professionnel. Si vous n'etes pas le destinataire de ce message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez recu ce message par erreur, nous vous remercions de le supprimer de votre systeme, ainsi que toutes ses copies, et d'en avertir immediatement HSBC France et ses filiales par message de retour. Il est impossible de garantir que les communications par messagerie electronique arrivent en temps utile, sont securisees ou denuees de toute erreur, alteration, falsification ou virus. En consequence, HSBC France et ses filiales declinent toute responsabilite du fait des erreurs, alterations, falsifications ou omissions qui pourraient en resulter.


Consider the environment before printing this mail.


The information contained in this e-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message by error, please delete it and all copies from your system and notify the sender immediately by return e-mail. E-mail communications cannot be guaranteed to be timely secure, error or virus-free. The sender does not accept liability for any errors or omissions which arise as a result.