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

RE: Parsing a string

Subject: RE: Parsing a string
From: xptm@xxxxxxx
Date: Fri, 4 Jun 2004 15:31:36 +0100
xsl parsing
Citando Michael Kay <mhk@xxxxxxxxx>:

> If you think you can start
> by handling very simple ones, and then tweak your code a bit whenever a new
> variant comes along, then you are going to get badly stuck.
>
> Michael Kay
>

I didn?t think so, i've wrote that piece of xsl so that you guys could get a
grip of the problem, but i allready know that it won't solve my problem.

However i solve the problem in the best way it can be solved. The guys who made
the XUI framework modify their code as to accept a new 'sql'attribute so i now
have this:

<ResultsSet>id="ProjectoLista_Grid" conn="default" sql="SELECT
Projecto.Projecto_K, Projecto.Projecto, Projecto.NomeProjecto FROM Projecto
ORDER BY rojecto.Projecto"/>

from this:
          <xsl:variable name="tablename">
              	<xsl:value-of
select="/Formatos/Forms/Form[1]/Grids[1]/Grid/@Nome"></xsl:value-of>
          </xsl:variable>
          <xsl:variable name="source">
      		<xsl:value-of
select="/Formatos/Forms/Form[1]/Grids[1]/Grid/@SourceObject"></xsl:value-of>
          </xsl:variable>
          <xsl:variable name="sql">
      		<xsl:value-of
select="/Formatos/Forms/Form[$source]/RowSource"></xsl:value-of>
          </xsl:variable>

          <xsl:element name="ResultSet">
      		<xsl:attribute name="id"><xsl:value-of
select="$tablename"/></xsl:attribute>
      		<xsl:attribute name="conn">default</xsl:attribute>
      		<xsl:attribute name="sql"><xsl:value-of select="$sql"/></xsl:attribute>
          </xsl:element>


Thanks to the XUI guys.

And to you guys too :)









O SAPO já está livre de vírus com a Panda Software, fique você também!
Clique em: http://antivirus.sapo.pt

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.