xsl-list
[Top] [All Lists]

RE: AndExpression

2003-11-26 10:14:51




Paul DuBois already gave you the answer, but you discounted it.

When doc_scope = 'EFSA', your expression evaluates to:
"@objectname='Document' and ($doc_scope!='EFSA' or $doc_scope != 'No
dissemination')"
"@objectname='Document' and (false or true)"
"@objectname='Document' and true"

When doc_scope="No dissemination", your expression evaluates to:
"@objectname='Document' and ($doc_scope!='EFSA' or $doc_scope != 'No
dissemination')"
"@objectname='Document' and (true or false)"
"@objectname='Document' and true"

When doc_scope="anything else", your expression evaluates to:
"@objectname='Document' and ($doc_scope!='EFSA' or $doc_scope != 'No
dissemination')"
"@objectname='Document' and (true or true)"
"@objectname='Document' and true"

Like Paul said, he second part always evaluates to true, and is worthless.

Without even looking at your documents, you probably wanted:
"@objectname='Document' and ($doc_scope!='EFSA' and $doc_scope != 'No
dissemination')"

Which would make the top two examples false, but still allow the "anything
else" case to be processed.

Anthony Zawacki



                                                                                
                                                             
                      "SHEIKH Sajjad"                                           
                                                             
                      <Sajjad(_dot_)SHEIKH(_at_)efsa(_dot_)eu(_dot_)int        
To:       <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>                    
                      
                      >                                 cc:                     
                                                             
                      Sent by:                          Subject:  RE: [xsl] 
AndExpression                                                    
                      owner-xsl-list(_at_)lists(_dot_)mulbe                     
                                                                        
                      rrytech.com                                               
                                                             
                                                                                
                                                             
                                                                                
                                                             
                      11/26/2003 11:40 AM                                       
                                                             
                      Please respond to xsl-list                                
                                                             
                                                                                
                                                             
                                                                                
                                                             




If I use
             <xsl:when test="@objname='Document' and $doc_scope!='EFSA'">
It works means it does not display the node where doc_scope != EFSA
I want to display only those nodes which are neither EFSA nor No
dissemination so I try the following
                         <xsl:when test="@objname='Document' and
($doc_scope!='EFSA' or $doc_scope!='No dissemination')">
And it displays both EFSA and No dissemination
Shows that there is a problem here.

Here is the complete sheet and xml document to test.

-----------------style sheet---------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" version="1.0" encoding="iso-8859-1"
indent="yes"/>

<xsl:template match="/">
  <xsl:apply-templates select="/someURIs/file"/>
</xsl:template>

<xsl:template match="file">

  <xsl:variable name="copy_current_file" select="document(string(.))"/>
  <xsl:apply-templates select="$copy_current_file/livelink//llnode"/>

</xsl:template>

<xsl:template match="livelink//llnode">

             <xsl:variable name="doc_status"
select="category/attributeset/attribute[(_at_)attid=2]"/>
             <xsl:variable name="doc_scope"
select="category/attributeset/attribute[(_at_)name='Scope of
Dissemination']"/>
<xsl:choose>
             <xsl:when test="@objname='Document' and ($doc_scope!='EFSA' or
$doc_scope!='No dissemination')">
<!--      <xsl:when test="@objname='Document'"> -->

<table cellSpacing="0" cellPadding="3" width="100%" border="0">
 <tr height="5">
  <td width="5%"></td>
  <td width="50%"></td>
  <td width="35%"></td>
  <td width="10%"></td>
 </tr>

 <tr height="5" class="Ligne1"><td colspan="4"></td></tr>
  <tr height="20" class="Ligne1">
    <td width="5%" valign="top" align="center">
    </td>

     <td width="85%" valign="top" align="left" colspan="2">


<table>
             <tr>
         <td><font color="blue"><b>Ref (Internal Object
Id):&#160;&#160;</b></font></td>
              <td><xsl:value-of select="@id"/></td>
             </tr>

             <tr>
              <td><font color="blue"><b>Document
Name:&#160;&#160;</b></font></td>
         <xsl:choose>
          <xsl:when test="contains(@name,'.')">
           <td><xsl:value-of select="substring-before(@name,'.')"/></td>
          </xsl:when>
          <xsl:when test="contains(@name,'.')=false">
           <td><xsl:value-of select="@name"/></td>
          </xsl:when>
         </xsl:choose>
             </tr>

             <tr>
              <td><font color="blue"><b>Last Modified
Date:&#160;&#160;</b></font></td>
              <xsl:choose>
               <xsl:when test="contains (@modified, 'T')">
                <td><xsl:value-of
select="substring-before(@modified,'T')"/></td>
               </xsl:when>
               <xsl:otherwise>
                <td><xsl:value-of select="substring-before(@modified,'
')"/></td>
               </xsl:otherwise>
              </xsl:choose>
             </tr>

             <tr>
              <td><font color="blue"><b>Short
Description:&#160;&#160;</b></font></td>
         <xsl:choose>
          <xsl:when test="@description">
           <td><xsl:value-of select="@description"/></td>
          </xsl:when>
               <xsl:otherwise>
           <td>Not Available</td>
               </xsl:otherwise>
         </xsl:choose>
             </tr>

             <tr>
              <td><font color="blue"><b>Scope of
Dissemination:&#160;&#160;</b></font></td>
              <td><xsl:value-of select="$doc_scope"/></td>
             </tr>
</table>
   </td>

    <td width="10%" valign="middle" align="center">
     <xsl:choose>
      <xsl:when test="($doc_scope='EFSA') or ($doc_scope='No
dissemination')">
             <a href="#"><IMG src="Icones/broken.gif" alt="*.Restricted"
border="0" align="middle"/></a>
             <tr><td width="5%" valign="top" align="center"></td>
        <td width="85%" valign="top" align="left" colspan="2">
        <a href="mailto:admin(_at_)efsa(_dot_)eu(_dot_)int">Request this 
document</a>
             </td></tr>
      </xsl:when>

      <xsl:when test!="$doc_scope='EFSA' or $doc_scope!='No
dissemination'">
              <xsl:choose>
         <xsl:when test="substring-after(@mimetype,'/')='msword'">
               <A HREF="#"><IMG src="Icones/doc.gif" alt="*.doc" border="0"
align="middle"/></A>
         </xsl:when>
         <xsl:when test="substring-after(@mimetype,'/')='pdf'">
               <A HREF="#"><IMG src="Icones/pdf.gif" alt="*.pdf" border="0"
align="middle"/></A>
         </xsl:when>
         <xsl:when
test="substring-after(@mimetype,'/')='vnd.ms-powerpoint'">
               <A HREF="#"><IMG src="Icones/ppt.gif" alt="*.ppt" border="0"
align="middle"/></A>
         </xsl:when>
         <xsl:when test="substring-after(@mimetype,'/')='vnd.ms-excel'">
               <A HREF="#"><IMG src="Icones/excel.gif" alt="*.xls"
border="0"
align="middle"/></A>
         </xsl:when>
         <xsl:when
test="substring-after(@mimetype,'/')='x-zip-compressed'">
               <A HREF="#"><IMG src="Icones/zip1.jpg" alt="*.jpg"
border="0"
align="middle"/></A>
         </xsl:when>
          <xsl:when
test="substring-after(@mimetype,'/')='x-outlook-msg'">
               <A HREF="#"><IMG src="Icones/mail.gif" alt="*.mail"
border="0"
align="middle"/></A>
          </xsl:when>
          <xsl:when test="substring-after(@mimetype,'/')='rtf' or
substring-after(@mimetype,'/')='richtext'">
               <A HREF="#"><IMG src="Icones/rtf1.gif" alt="*.rtf"
border="0"
align="middle"/></A>
          </xsl:when>
          <xsl:when test="substring-after(@mimetype,'/')='vnd.visio'">
               <A HREF="#"><IMG src="Icones/visio.gif" alt="*.vsd"
border="0"
align="middle"/></A>
          </xsl:when>
              <xsl:when test="substring-after(@mimetype,'/')='plain'">
               <A HREF="#"><IMG src="Icones/text1.gif" alt="*.gif"
border="0"
align="middle"/></A>
         </xsl:when>
               <xsl:when
test="substring-after(@mimetype,'/')='octet-stream'">
               <A HREF="#"><IMG src="Icones/octet1.gif" alt="*.octet"
border="0" align="middle"/></A>
          </xsl:when>
               <xsl:when test="substring-after(@mimetype,'/')='tiff'">
               <A HREF="#"><IMG src="Icones/tif.gif" alt="*.tif" border="0"
align="middle"/></A>
          </xsl:when>
               <xsl:when test="substring-after(@mimetype,'/')='pjpeg'">
               <A HREF="#"><IMG src="Icones/jpg.gif" alt="*.jpg" border="0"
align="middle"/></A>
          </xsl:when>
               <xsl:when test="substring-after(@mimetype,'/')='html'">
               <A HREF="#"><IMG src="Icones/html.gif" alt="*.html"
border="0"
align="middle"/></A>
          </xsl:when>
               <xsl:when test="substring-after(@mimetype,'/')='xml'">
               <A HREF="#"><IMG src="Icones/xml.gif" alt="*.xml" border="0"
align="middle"/></A>
          </xsl:when>
              <xsl:otherwise>
                <A HREF="#"><IMG src="Icones/format.gif" alt="*.ppt"
border="0" align="middle"/></A>
              </xsl:otherwise>
         </xsl:choose>
      </xsl:when>
     </xsl:choose>
    </td>
 </tr>
</table>
<hr/>

 </xsl:when>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>
------------------------------------------------------------------------
-----------

----------------------------- xml document
---------------------------------------

  <?xml version="1.0" encoding="ISO-8859-1" ?>
- <livelink applanguage="USA" appversion="9.1.0" compressed="false"
dftconnection="LIVELINK91SP3" dtdversion="1.2" format="saw"
supppath="..\..\..\..\support\">
  <location path="..\..\..\">Enterprise</location>
  <location path="..\..\">AFC</location>
  <location path="..\">6. General Administration</location>
  <location last="true" path="">2. I - Internal
Administration</location>
- <llnode container="true" created="09/03/2003 10:56 AM"
createdby="12695" createdbyname="spowner" id="13233" img="folder.gif"
modified="11/11/2003 01:14 PM"
name="2%2E%20I%20%2D%20Internal%20Administration" objname="Folder"
objtype="0" ownedby="12695" ownedbyname="Panels, Scientific"
parentid="13217" size="2">
- <category defid="11762" name="Security Data (EFSA)" versionid="3">
- <attributeset attid="1" name="Security Data (EFSA)">
  <attribute attid="2" name="Classification Level" type="10" />
  <attribute attid="3" name="Scope of Dissemination" type="10" />
  </attributeset>
  </category>
- <node cacheexpiration="0" catalog="0" childcount="2"
createdate="2003-09-03T10:56:25" createdby="12695" groupid="11445"
groupperm="36995" id="13233" maxversion="-1"
modifydate="2003-11-11T13:14:19" name="2. I - Internal Administration"
originalid="0" originalvolid="0" parentid="13217" reserved="0"
reservedby="0" subtype="0" systemperm="16777215" userid="12695"
userperm="16777215" versionnum="0" volumeid="-2000" worldperm="128">
- <permission>
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="true" modify="true" name="spowner" permissions="16777215"
permtype="1" reserve="true" rightid="12695" rightname="spowner"
righttype="0" see="true" seecontent="true" />
  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Scientific Coordinators"
permissions="36995" permtype="2" reserve="false" rightid="11445"
rightname="Scientific Coordinators" righttype="1" see="true"
seecontent="true" />
  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Public Access" permissions="128"
permtype="3" reserve="false" rightid="-1" rightname="Public Access"
righttype="1" see="false" seecontent="false" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_Administrative_Support"
permissions="258191" permtype="0" reserve="true" rightid="12547"
rightname="AFC_Administrative_Support" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_FADD_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="12621"
rightname="AFC_FADD_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_FCM_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="12615"
rightname="AFC_FCM_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_FLAV_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="11503"
rightname="AFC_FLAV_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_IRRAD_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="11497"
rightname="AFC_IRRAD_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="11509"
rightname="AFC_Supervisor" righttype="1" see="true" seecontent="true" />

  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Internal Users"
permissions="36995" permtype="0" reserve="false" rightid="11569"
rightname="Internal Users" righttype="1" see="true" seecontent="true" />

  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Management" permissions="128"
permtype="0" reserve="false" rightid="11566" rightname="Management"
righttype="1" see="false" seecontent="false" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="spowner" permissions="258191"
permtype="0" reserve="true" rightid="12695" rightname="spowner"
righttype="0" see="true" seecontent="true" />
  </permission>
  </node>
- <llnode container="false" created="11/11/2003 01:13 PM"
createdby="1000" createdbyname="Admin" id="27990" img="appword.gif"
mimetype="application/msword" modified="11/11/2003 01:13 PM"
name="IA_2003_01" objname="Document" objtype="144" ownedby="1000"
ownedbyname="Sheikh, Sajjad R." parentid="13233" size="110592"
versionnum="1">
- <category defid="11762" name="Security Data (EFSA)" versionid="3">
- <attributeset attid="1" name="Security Data (EFSA)">
  <attribute attid="2" name="Classification Level"
type="10">Unrestricted</attribute>
  <attribute attid="3" name="Scope of Dissemination" type="10">World (no
limitation)</attribute>
  </attributeset>
  </category>
- <node cacheexpiration="0" catalog="0" childcount="0"
createdate="2003-11-11T13:13:59" createdby="1000" groupid="11445"
groupperm="36995" id="27990" maxversion="-1"
modifydate="2003-11-11T13:13:59" name="IA_2003_01" originalid="0"
originalvolid="0" parentid="13233" reserved="0" reservedby="0"
subtype="144" systemperm="16777215" userid="1000" userperm="16777215"
versionnum="1" volumeid="-2000" worldperm="128">
- <permission>
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="true" modify="true" name="Admin" permissions="16777215"
permtype="1" reserve="true" rightid="1000" rightname="Admin"
righttype="0" see="true" seecontent="true" />
  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Scientific Coordinators"
permissions="36995" permtype="2" reserve="false" rightid="11445"
rightname="Scientific Coordinators" righttype="1" see="true"
seecontent="true" />
  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Public Access" permissions="128"
permtype="3" reserve="false" rightid="-1" rightname="Public Access"
righttype="1" see="false" seecontent="false" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_Administrative_Support"
permissions="258191" permtype="0" reserve="true" rightid="12547"
rightname="AFC_Administrative_Support" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_FADD_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="12621"
rightname="AFC_FADD_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_FCM_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="12615"
rightname="AFC_FCM_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_FLAV_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="11503"
rightname="AFC_FLAV_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_IRRAD_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="11497"
rightname="AFC_IRRAD_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="11509"
rightname="AFC_Supervisor" righttype="1" see="true" seecontent="true" />

  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Internal Users"
permissions="36995" permtype="0" reserve="false" rightid="11569"
rightname="Internal Users" righttype="1" see="true" seecontent="true" />

  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Management" permissions="128"
permtype="0" reserve="false" rightid="11566" rightname="Management"
righttype="1" see="false" seecontent="false" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="spowner" permissions="258191"
permtype="0" reserve="true" rightid="12695" rightname="spowner"
righttype="0" see="true" seecontent="true" />
  </permission>
  </node>
  <version createdate="2003-11-11T13:13:59"
filecreatedate="2003-11-11T13:13:59" filedatasize="110592"
filemodifydate="2003-11-11T13:13:59" filename="eu_register.doc"
fileplatform="2" fileressize="0" filetype="doc" id="27992" indexed="0"
locked="0" mimetype="application/msword"
modifydate="2003-11-11T13:13:59" name="1" nodeid="27990" number="1"
owner="1000" ownerbyname="Admin" providerid="27991"
providername="EXTSHARED" urlfilename="eu_register.doc" />
  </llnode>
- <llnode container="false" created="11/11/2003 01:14 PM"
createdby="1000" createdbyname="Admin" id="27993" img="appppoin.gif"
mimetype="application/vnd.ms-powerpoint" modified="11/11/2003 01:14 PM"
name="IA_2003_02" objname="Document" objtype="144" ownedby="1000"
ownedbyname="Sheikh, Sajjad R." parentid="13233" size="266240"
versionnum="1">
- <category defid="11762" name="Security Data (EFSA)" versionid="3">
- <attributeset attid="1" name="Security Data (EFSA)">
  <attribute attid="2" name="Classification Level"
type="10">Unrestricted</attribute>
  <attribute attid="3" name="Scope of Dissemination" type="10">No
dissemination</attribute>
  </attributeset>
  </category>
- <node cacheexpiration="0" catalog="0" childcount="0"
createdate="2003-11-11T13:14:19" createdby="1000" groupid="11445"
groupperm="36995" id="27993" maxversion="-1"
modifydate="2003-11-11T13:14:19" name="IA_2003_02" originalid="0"
originalvolid="0" parentid="13233" reserved="0" reservedby="0"
subtype="144" systemperm="16777215" userid="1000" userperm="16777215"
versionnum="1" volumeid="-2000" worldperm="128">
- <permission>
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="true" modify="true" name="Admin" permissions="16777215"
permtype="1" reserve="true" rightid="1000" rightname="Admin"
righttype="0" see="true" seecontent="true" />
  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Scientific Coordinators"
permissions="36995" permtype="2" reserve="false" rightid="11445"
rightname="Scientific Coordinators" righttype="1" see="true"
seecontent="true" />
  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Public Access" permissions="128"
permtype="3" reserve="false" rightid="-1" rightname="Public Access"
righttype="1" see="false" seecontent="false" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_Administrative_Support"
permissions="258191" permtype="0" reserve="true" rightid="12547"
rightname="AFC_Administrative_Support" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_FADD_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="12621"
rightname="AFC_FADD_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_FCM_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="12615"
rightname="AFC_FCM_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_FLAV_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="11503"
rightname="AFC_FLAV_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_IRRAD_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="11497"
rightname="AFC_IRRAD_Supervisor" righttype="1" see="true"
seecontent="true" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="AFC_Supervisor"
permissions="258191" permtype="0" reserve="true" rightid="11509"
rightname="AFC_Supervisor" righttype="1" see="true" seecontent="true" />

  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Internal Users"
permissions="36995" permtype="0" reserve="false" rightid="11569"
rightname="Internal Users" righttype="1" see="true" seecontent="true" />

  <acl create="false" delete="false" deletever="false" editattr="false"
editperm="false" modify="false" name="Management" permissions="128"
permtype="0" reserve="false" rightid="11566" rightname="Management"
righttype="1" see="false" seecontent="false" />
  <acl create="true" delete="true" deletever="true" editattr="true"
editperm="false" modify="true" name="spowner" permissions="258191"
permtype="0" reserve="true" rightid="12695" rightname="spowner"
righttype="0" see="true" seecontent="true" />
  </permission>
  </node>
  <version createdate="2003-11-11T13:14:19"
filecreatedate="2003-11-11T13:14:19" filedatasize="266240"
filemodifydate="2003-11-11T13:14:19" filename="xmlInterlinks.ppt"
fileplatform="2" fileressize="0" filetype="ppt" id="27995" indexed="0"
locked="0" mimetype="application/vnd.ms-powerpoint"
modifydate="2003-11-11T13:14:19" name="1" nodeid="27993" number="1"
owner="1000" ownerbyname="Admin" providerid="27994"
providername="EXTSHARED" urlfilename="xmlInterlinks.ppt" />
  </llnode>
  </llnode>
  </livelink>
------------------------------------------------------------------------
-------------------------------------------------

-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Sent: 26 November 2003 17:02
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] AndExpression




<xsl:when test="@objname='Document' and ($doc_scope!='EFSA' or
   $doc_scope!='No dissemination')">

Does anyone know why it doesn't work?

How on earth are we to guess?

It presumably doesn't generate an error as it looks syntactically OK, so
by "doesn't work" I assume you mean it tests as false when you expected
it to be true, or as true when you expected it to be false, but since we
don't know the values of @objname or $doc_scope what can we say?

I will hazard a guess that if $doc_scope is a node set you probably
don't want to use != with it, != is almost never useful on non trivial
node sets as it it will evaluate to true (whatever you are comparing
against) if there are two nodes in the set with different values.

David

--
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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


______________________________________________________________
This message has been scanned for all viruses by BTnet VirusScreen. The
service is delivered in partnership with MessageLabs.

This service does not scan any password protected or encrypted
attachments.

If you are interested in finding out more about the service, please
visit our website at
http://www.btignite.com/internetservices/btnet/products_virusscreen.htm
==============================================================

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





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



<Prev in Thread] Current Thread [Next in Thread>