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

Re: saxon with sql extension and attribute template v

Subject: Re: saxon with sql extension and attribute template values
From: Georges Schmitz <georges.schmitz@xxxxxxxxx>
Date: Wed, 27 Jun 2007 10:13:15 +0200
Re:  saxon with sql extension and attribute template  v
Thanks for your answer, I've read the docs, but apparently without having switched on my brain. The documentation doesn't say anything about AVT for row-tag and col-tag.

Michael Kay wrote:
connection is an AVT so it should be connection="{$connection}".
Sorry, but connection is not an AVT.
xsl:attribute creates an attribute node in the result tree - never an
attribute for the containing instruction in the stylesheet.

Good to be reminded of this.
row-tag and column-tag are not AVTs, they must be supplied as literal
values. Those attributes that *are* AVTs are described as such in the


The SQL extension to Saxon was all user-contributed, the reason I say it's
not production-quality is that I don't have the resources to do the
extensive testing needed to do it justice. (I have accepted user-contributed
code in this area that was accompanied by very little test material,
something that I wouldn't do for the mainstream product).
The extension is very helpful in my script, I just need to populate an xml data-interface with sample data from a database.

Michael Kay

-----Original Message-----
From: Georges Schmitz [mailto:georges.schmitz@xxxxxxxxx] Sent: 26 June 2007 17:06
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: saxon with sql extension and attribute template values

I'm using saxon8-9-0-3j in combination with the sql extension. But using it in a more dynamic way (providing the sql select components by variables or parameters) doesn't work. In the documentation Michael Kay declares the query attributes as being "attribute value templates", but I just get expected results, when I use literal values. It doesn't work either with an xsl:attribute declaration (see "row-tag").

<xsl:variable name="table" as="xs:string">tc_ad</xsl:variable>
<xsl:variable name="cols" as="xs:string">id,nationalidnr,subject</xsl:variable>
<sql:query connection="$connection" table="{$table}" column="{$cols}" column-tag="col" >
<xsl:attribute name="row-tag">
<xsl:value-of select="$table"/>

Current Thread


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.
First Name
Last Name
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.