[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xsl:function problem

Subject: RE: xsl:function problem
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 14 May 2007 09:55:24 +0100
RE:  xsl:function problem
Please show a complete (but as small as possible) stylesheet that
demonstrates the problem.

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

> -----Original Message-----
> From: Ilya Sterin [mailto:sterini@xxxxxxxxx] 
> Sent: 14 May 2007 00:40
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  xsl:function problem
> 
> Yeah, sorry, it should have been...
> <xsl:variable name="identifiers"><xsl:value-of 
> select="p2f:lookupNameFor()"/> </xsl:variable>
> 
> validates, but the following
> 
> <xsl:variable name="identifiers"><xsl:value-of 
> select="p2f:lookupNameFor('test')"/>
> </xsl:variable>
> 
> Does not.  The function is defined with one xsl:param and it 
> seems that it doesn't recognize that signature.
> 
> Ilya
> 
> 
> On 13 May 2007 19:46:59 +0100, Colin Paul Adams 
> <colin@xxxxxxxxxxxxxxxxxx> wrote:
> > >>>>> "Ilya" == Ilya Sterin <sterini@xxxxxxxxx> writes:
> >
> >     Ilya> I'm using a very simple function and transforming through
> >     Ilya> oxygen configured to use Saxon8B.
> >
> >     Ilya> The function seems to be ok when no parameters 
> are required,
> >     Ilya> but seems to ignore xsl:param when added?
> >
> >     Ilya> Here is an example...
> >
> >     Ilya> <xsl:function name="p2f:lookupNameFor"> <xsl:param
> >     Ilya> name="formOID" as="xs:string"/> <xsl:value-of
> >     Ilya> select="tokenize(//ItemGroupDef[OID=$formOID]/@Name,
> >     Ilya> '::')"/> </xsl:function>
> >
> >
> >     Ilya> Then when the function is called without any 
> params the xslt
> >     Ilya> validates fine...
> >
> >     Ilya> <xsl:variable name="identifiers"><xsl:value-of
> >     Ilya> select="p2f:lookupNameFor('test')"/></xsl:variable>
> >
> >     Ilya> and the following throws an error...
> >
> >     Ilya> <xsl:variable name="identifiers"><xsl:value-of
> >     Ilya> select="p2f:lookupNameFor('test')"/></xsl:variable>
> >
> >     Ilya> F [Saxon8B] XPath syntax error at char 30 on line 23 in
> >     Ilya> {p2f:lookupPrismNameFor('test')}: Cannot find a matching
> >     Ilya> 1-argument function named
> >     Ilya> 
> {http://www.nextrials.com/ns/prism2flex/v1.0}lookupNameFor()
> >
> >     Ilya> The p2f namespace prefix is declared correctly.
> >
> >
> >     Ilya> Am I doing something wrong?
> >
> > You appear to be cut-and-pasting wrong, as I cannot see any 
> difference 
> > between your two examples.
> > --
> > Colin Adams
> > Preston Lancashire

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.