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

AW: conditional <sql:column> ?!

Subject: AW: conditional <sql:column> ?!
From: "Szabo, Patrick (LNG-VIE)" <patrick.szabo@xxxxxxxxxxxxx>
Date: Tue, 23 Sep 2008 14:15:51 +0200
AW:  conditional <sql:column> ?!
Thx, thats me being stupid again -.-

cheers

Patrick Szabo
EPD / XSLT Konvertierung
Tel.: +43-1-534 52-1573
Fax.: +43-1-534 52-1573
patrick.szabo@xxxxxxxxxxxxx

LexisNexis Verlag ARD Orac GmbH & Co KG
Marxergasse 25, 1030 Wien
FN 8333f, Handelsgericht Wien
www.lexisnexis.at





-----Urspr|ngliche Nachricht-----
Von: Martin Honnen [mailto:Martin.Honnen@xxxxxx]
Gesendet: Dienstag, 23. September 2008 14:04
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: Re:  conditional <sql:column> ?!

Szabo, Patrick (LNG-VIE) wrote:

> This does not work because there is no xsl:if allowed in sql:insert and no
sql:column in xsl:if.
>
> How can i accomplish a conditional sql:column ?!

I guess in that case you have to use
   <xsl:choose>
     <xsl:when
test="/ris:result/ris:data/ris:risdokument/ris:metadaten/ris:technisch/ris:or
gan/text()='OGH'
and
/ris:result/ris:data/ris:risdokument/ris:metadaten/ris:judikatur/ris:doktyp='
T'">
   <sql:insert connection="$connection" table="concat($art,'_',$gericht)">
<sql:column name="DOKNR"
select="normalize-space(replace(/ris:result/ris:data/ris:risdokument/ris:meta
daten/ris:technisch/ris:id,'_','/'))"/>
<sql:column name="Datum"
select="normalize-space(replace(/ris:result/ris:data/ris:risdokument/ris:meta
daten/ris:judikatur/ris:datum,
'-', ''))"/>
<sql:column name="Filename"
select="normalize-space(concat(/ris:result/ris:data/ris:risdokument/ris:metad
aten/ris:technisch/ris:id/text(),
'.xml'))"/>
<sql:column name="Gesnr"
select="normalize-space(string(/ris:result/ris:data/ris:risdokument/ris:metad
aten/ris:judikatur/ris:gz/child::*[$count]))"/>
<sql:column name="SZ" select="concat('SZ
',replace(substring-after(normalize-space(/ris:result/ris:data/ris:risdokumen
t/ris:dokumentliste/ris:hauptdokument/ris:inhalt/ris:daten/ris:xml/ris:nutzda
ten/ris:abschnitt[1]/ris:fzinhalt[@typ='p']/ris:absatz),
'Seite '), ' von ', '/'))"/>
</sql:insert>
</xsl:when>
<xsl:otherwise>
<sql:insert connection="$connection" table="concat($art,'_',$gericht)">
<sql:column name="DOKNR"
select="normalize-space(replace(/ris:result/ris:data/ris:risdokument/ris:meta
daten/ris:technisch/ris:id,'_','/'))"/>
<sql:column name="Datum"
select="normalize-space(replace(/ris:result/ris:data/ris:risdokument/ris:meta
daten/ris:judikatur/ris:datum,
'-', ''))"/>
<sql:column name="Filename"
select="normalize-space(concat(/ris:result/ris:data/ris:risdokument/ris:metad
aten/ris:technisch/ris:id/text(),
'.xml'))"/>
<sql:column name="Gesnr"
select="normalize-space(string(/ris:result/ris:data/ris:risdokument/ris:metad
aten/ris:judikatur/ris:gz/child::*[$count]))"/>
</sql:insert>
</xsl:otherwise>
</xsl:choose>


--

	Martin Honnen
	http://JavaScript.FAQTs.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.