xsl-list
[Top] [All Lists]

RE: [xsl] saxon with sql extension and attribute template values

2007-06-26 09:20:39
connection is an AVT so it should be connection="{$connection}".

xsl:attribute creates an attribute node in the result tree - never an
attribute for the containing instruction in the stylesheet. 

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
documentation:

http://www.saxonica.com/documentation/sql-extension/query.html

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).

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

-----Original Message-----
From: Georges Schmitz [mailto:georges(_dot_)schmitz(_at_)heitec(_dot_)de] 
Sent: 26 June 2007 17:06
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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"/>
        </xsl:attribute>
      </sql:query>


So what am I missing, or is the sql extension really just a 
show case (Michael Kay warns the user at the beginning of the 
description that it is not "production-quality")?

Thanks,
Georges

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--