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

RE: Need a confirmation of a difference between WD-xsl

Subject: RE: Need a confirmation of a difference between WD-xsl and 1999/XSL/Transform
From: "Rene de Vries" <RdVries@xxxxxxxxxxx>
Date: Wed, 23 Jan 2002 16:39:54 +0100
xsl if test example
Hi Jean-Christophe,

I don't know the difference between them, just don't use the WD-xsl.

Your
<xsl:if test='(test1) and (test2) and (test3)'>
<xsl:if test='(test1) or (test2) or (test3)'>
should work if your tests are syntactically correct.

I use tests like:
<xsl:when test="xsd:restriction[@base='xsd:string'] or
xsd:simpleContent/xsd:extension[@base='xsd:string']">

Thing is by putting WD-xsl in your XSLT, the IE uses a Microsoft dialect of
XSLT which is not conform the W3C-specs. The WD stands for Working Draft and
you can expect problems with that. No non-MS-parser has to support the
WD-dialect, but the MSXML-parsers (like IE uses) do. So why DO you use this
WD-xsl???? Try putting the line
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" into your XSLT. If the IE
doesn't display anything anymore, try installing the MSXML4 on your client
and try if your XSLT works then.
If it still doesn't work, you know it's not the WD-xsl giving the problem,
and we can look into your XML and XSL to see what's wrong.

Greetings René
  {@   @}
      ^
     \_/

"You don't need eyes to see, you need vision!"
-----Oorspronkelijk bericht-----
Van: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]Namens Jean-Christophe
Papot
Verzonden: woensdag 23 januari 2002 12:27
Aan: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Onderwerp:  Need a confirmation of a difference between WD-xsl and
1999/XSL/Transform


Hi all,

I'm generating an XSL from an XML template, using the DOM, for the WD-xsl
version (IE5 client) !!!
In my application, depending on the value of an attribute (@LOGIC = 'and' or
@LOGIC='or'), I have to write a different output :

If the value is 'and', i must write an xsl:if test with few tests depending
on the number of specific childnodes. For example if I have three childnodes
:

<xsl:if test='(test1) and (test2) and (test3)'>

Of course with a value of 'or', I should write :

<xsl:if test='(test1) or (test2) or (test3)'>

My first problem is that it seems the WD-xsl version can't handle that, I
can only make one test : example :

<xsl:if test='/ELEMENT1[@Attrib1 = 'val1' $and$ @Attrib2 = 'val2']'> (this
works)

This doesn't work :

<xsl:if test='(/ELEMENT1[@Attrib1 = 'val1' $and$ @Attrib2 = 'val2']) and
(test2) and (test3)'>

So first question : Is this "normal" and does it depends on the XSL Parser
version ?
Second question : How can i handle it with the WD-xsl version ?

I started looking for a serie of <xsl:if> such as :
<xsl:if test='test1'>
    <xsl:if test='test2'>
        <xsl:if test='test3'>
            This is okay in the case of a 'and' for my @LOGIC attribute
        </xsl:if>
    </xsl:if>
</xsl:if>

But how to do it for the 'or'

I can't do this (the output file would be too large)

<xsl:if test='test1'>
     write my XML bloc
</xsl:if>
<xsl:if test='test2'>
     write my XML bloc
</xsl:if>
<xsl:if test='test3'>
     write my XML bloc
</xsl:if>

And it's the same with the xsl:choose/xsl:when.

If someone feels inspired... Don't hesitate

Thanks a lot

Jean-Christophe


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



 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.