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

Re: dynamic-context type-branching

Subject: Re: dynamic-context type-branching
From: ac <ac@xxxxxxxxxxxxx>
Date: Tue, 05 Feb 2008 17:53:52 -0500
Re:  dynamic-context type-branching
Hi,

Another use case that we have is when an application/stylesheet supports user variables to hold content and values used repeatatively, for example, and where the variable/expression evaluator may typically output different types, depending on the variable/context being evaluated.

Thanks.
Cheers,
ac




Hi Michael,

I picked the saxon:evaluate() use case because it seemed obvious that anything could come out of it, but I also have one or two other cases where a template/function can output different things, typically a string or a node sequence. All these cases seem to be more concentrated around content query and layout management, where polymorphism contributes to content abstraction. I would certainly support increased orthogonality in handling atomic values, in node selecting/processing contexts (ex: apply-templates).

Thanks,
ac




Michael Kay a icrit :
In schema unaware xslt2 environments, what would be the best way to select action depending on the result type (ex: string, text node(s), attribute(s), element(s)) of saxon:evaluate(), ex:

I think it's basically to do an xsl:choose. However, your note reminded me
to add "apply-templates on atomic values" to the candidate requirements list
for future XSLT versions. It's a little hard to come up with really
convincing use cases, but I think it would make the language more orthogonal
and that's always a good thing. Certainly, polymorphism on atomic values as
well as on nodes seems intrinsically desirable.


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

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.