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

RE: problem with xsl:choose

Subject: RE: problem with xsl:choose
From: "Student1 ASCO-ELK (RBJE/ELK)" <Student1.ASCO-ELK@xxxxxxxxxxxx>
Date: Fri, 25 May 2001 11:19:34 +0200
RE:  problem with xsl:choose
unfortunately i have some book about xlst ;)

my xml file 
<data>
  <screen h=2 w=3 />
....
  <table h=2 w=4 />
....
</data>

sorry, i forget to mention that, the <screen> and <table> are NOT mandatory.
the xmldocument varies
and if for example the <table> tag is not in the document i dont want the 
<table name='table'> to be in the final document.


my xsl file
xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
  <xsl:template match='/'>
     <xsl:choose>
       <xsl:when select='//screen'>
		<table class=screen>
			<xsl:attribute name=tID><xsl:value-of select="@h"
/><xsl:attribute>
			<xsl:call-template name='screenHdr'/>
			<xsl:apply-templates select='//screen />
		</table>
       </xsl:when>
       <xsl:when select='//table'>
		<table class=table>
			<xsl:attribute name=tID><xsl:value-of select="@h"
/><xsl:attribute>
			<xsl:call-template name='tableHdr'/>
			<xsl:apply-templates select='//table />
		</table>
       </xsl:when>
       <xsl:otherwise>
		error
       </xsl:otherwise>
     </xsl:choose>
  </xsl:stylesheet>
</xsl:stylsheet>


i cant use only the <xsl:apply-templates ... /> because i dont want the
<table ...></table> to appear in the outputfile


you know now what i mean ?
thx in advance cu goose

-----Original Message-----
From: Goetz Bock [mailto:bock@xxxxxxxxxxx]
Sent: Friday, May 25, 2001 5:51 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  problem with xsl:choose



On Fri, May 25 '01 at 10:27, Student1 ASCO-ELK (RBJE/ELK) wrote:
> i cant use the <xsl:apply-templates .../>
> because of the 'FOOBARs' and 'BLABLABLAs' ;)
> i dont want them to be seen in the final document
You should most likely get a book about XSL-T ;-)

I've not been able to figure out, what you realy want. Could you provide
a stripped down version of

- your source XML document
- your intended output

Both files should be as brief as possible but as complete as possible.

I'm sure some one on this list can point you into the right direction
with this two files,    

    Goetz.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.