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

Re: <xsl:choose> <xsl:when> and graphics salad!

Subject: Re: <xsl:choose> <xsl:when> and graphics salad!
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 5 Apr 2000 14:12:35 +0100 (BST)
salad graphics
me> but it's not possible to say without seeing an input example.
> but I warn you its lengthy.
it's also not the _input_ its the stylesheet.

but guessing what the input looks like from your stylesheet I can make
some comments (same comments as the first time I suspect)

<xsl:template match="image">
<xsl:choose>
so far so good.

	<xsl:when test="contains (@align,'banner')">

	</xsl:when>
so if you have 
   <image align="xxbannerxx" (any other attributes)>... </image>
then you get no output at all


	<xsl:when test="contains (@align,'right')">

if you have
  <image align='xxrightxx'...
then
		<xsl:if test="contains(/text/@text.role,'note')">
It is pointless having a test using an absolute path like this _inside_
the image template. It means the system has to go and fetch this node
each time and evaluate this expression, but you get the same value true
or false for _every_ image, as the test does not use any of the data
in the image element. It is false unless your top level document
element is <text text.role='note'/> so you may as well test for that at
the top level of the stylesheet.

 (<xsl:value-of select="//para/@secur.classif"/>)
similarly this is OK but may as well be at the top level of your
stylesheet as it just slows things down working it out again for each
image. It always just gives you the secur.classif of the first para
element anywhere in the document.


		<xsl:value-of select="text"/> ...

So does your input look like

<?xml version ="1.0>
<text text.role='note'>
.....
 <image align='right' reference='xxx'>
  <text> stuff</text>
  <illust> more stuff</illust>
  <image>
....
<text>

If so the stylesheet looks about right, if not then some of your select
expressions will be returning empty node lists.


avid


 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.