Re: [xslt] sql extension to xslt in libxslt




Daniel Veillard wrote:
> 
> On Thu, Oct 18, 2007 at 07:11:58PM +0200, Pawel Cesar Sanjuan Szklarz
> wrote:
>> Hi.
>> 
>> In libgda i made a extension do libxslt. May be interesting.
> 
>  What do you mean ? If you suggest it could be added to libxslt,
> I don't think it's a good idea. Could be shipped as an idependant library
> but I can't make libxslt depends on some form of SQL engine, that's
> way too specific.
>   But maybe I misunderstood what you're suggesting...
> 
> Daniel
> 
> 
Hi.
 Misunderstood!!. I dont want do add this to libxslt. I am using libxslt.

This extension have a feature, that I did not found in any other extension.
Inside the extension nodes, you can use a <xsl:call-template/> to use the
sql query results to generate any xml. Here is a example

<xsl:template name="showsale">
<xsl:variable name="srep" select="text()"/>
<sql:section>
  <!-- no predefined query are registred, so use the sql text inside the
node -->
  <sql:query name="customers">
  select * from customers
  where
  default_served_by = ##srep::gint
  </sql:query>
  <!-- $srep is set on xsl:variable at begin -->
  <sql:template>
  <!-- !!! sql:template allows only
        ___ONE___ xsl:call_template element (optionally with <xsl:params..
inside)
  -->
  <xsl:call-template name="customerData"/>
  </sql:template>
</sql:section>
  <!-- not implemented, but here the query 'user' will not be avalible-->
</xsl:template>




-- 
View this message in context: http://www.nabble.com/sql-extension-to-xslt-in-libxslt-tf4648074.html#a13307475
Sent from the Gnome - Lib - Xslt mailing list archive at Nabble.com.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]