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

Re: passing a sequence as a parameter

Subject: Re: passing a sequence as a parameter
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Tue, 26 Feb 2008 20:40:20 +0530
Re:  passing a sequence as a parameter
Sorry for all the confusion ...

Thanks Colin for the clarification.

On Tue, Feb 26, 2008 at 8:10 PM, Colin Adams
<colinpauladams@xxxxxxxxxxxxxx> wrote:
> On 26/02/2008, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
> > Hi Colin,
>
> Hello Mukul,
>
> >  On Tue, Feb 26, 2008 at 5:06 PM, Colin Adams
> >  <colinpauladams@xxxxxxxxxxxxxx> wrote:
> >  > Whether or not you can pass a sequence depends upon the processor. You
> >  > can do this with Gestalt, as it allows you to pass any XPath
> >  > expression. But you can't specify the type on the xsl:param with the
> >  > as attribute, which is unfortunate.
>
> >  I think, it's logical not to have type specification (with, as
> >  attribute) on xsl:param instruction. We pass parameters to the
> >  stylesheet from outside, and making the input environment XSLT/XPath
> >  type aware doesn't appear logical to me.
>
> I don't understand what you are saying.
> Xsl:param can take an as attribute. If the valued passed in does not
> match up to this type, then you get err:XTTE0590.
>
> What I was talking about was that you cannot specify something like
> as="(xs:boolean, xs:boolean, xs:integer)".
>
> With a schema-aware process, you could specify a user-defined type,
> which would do the trick. But not being very knowledgable about
> schema-aware processing, I am not clear as to which schema would be
> searched for global paranmeter checking.
> In any case, Gestalt is not schema-aware, which is what I was getting
> at. Sorry for not being clearer.
>
> >As currently happening, whatever that is passed to the stylesheet to
> >xsl:param variables, can be casted in the stylesheet to an appropriate
> >type. I think, this is the correct design
>
> Well I don't. There is no reason why the author of the stylesheet
> should have to implement XPath parsing.
>
> A solution is to pass in each memeber of the sequence as a separate
> typed variable. This relies on be able to pass XPath values as
> parameters. It will work with Gestalt and any other processor that has
> such a facility.
>
> Another solution that will work with a schema-aware processor is to
> pass a URI to a parameters document, and have it validated. This is
> much more clumsy from the point of view of the user of the interface
> to the processor.
>
> Best would be able to say:
>
> as="(xs:boolean, xs:boolean, ...)"



-- 
Regards,
Mukul Gandhi

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.