RE: [xsl] XML/XSL output

Subject: RE: [xsl] XML/XSL output
From: "Américo Albuquerque" <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Wed, 11 Sep 2002 10:50:19 +0100
Hi.

You could use
<xsl:when test="Account | Company">
.....
</xsl:when>

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
Girish.Savadatti
Sent: Tuesday, September 10, 2002 7:10 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] XML/XSL output


 Hi,

 I have xml element as follows :

- <metadata>
  <URL>www.yahoo.com</URL>
  <DocTitle>June, July and August 2002 EDI Updates</DocTitle>
  <DocType>ImportantUpdates</DocType>
  <SecurityGroup>Public</SecurityGroup>
  <ReleaseDate>8/28/2002 11:29 AM</ReleaseDate>
  <Site>Extranet, Intranet</Site>
  </metadata>

- <metadata>
  <URL>www.hotmail.com</URL>
  <DocTitle>June, July and August 2002 EDI Updates</DocTitle>
  <DocType>ImportantUpdates</DocType>
  <SecurityGroup>Public</SecurityGroup>
  <ReleaseDate>8/28/2002 11:28 AM</ReleaseDate>
  <Company>Sun</Company>
  <Site>Extranet, Intranet</Site>
  </metadata>

  There are two main elements I am looking for 1) Account 2) Company.
  Account element may or may not exists.
  Company element may or may not exists.
  I am trying to write xsl style sheet to get html output depending upon
above conditions.

            <xsl:when test="Account[.=''] and Company[.='']">
            <tr>
              <td>
                <a>
                  <xsl:attribute name="href"><xsl:value-of
select="URL"/></xsl:attribute>
                  <xsl:value-of select="DocTitle"/>
                </a>
              </td>
              <td><xsl:value-of select="substring-before(ReleaseDate, '
')"/></td>
            </tr>
            <tr><td><br></br></td></tr>
          </xsl:when>

  if both Account and Company elements are missing then
url(www.yahoo.com)
should be displayed on the html output. The xsl code is not working and
doesn't display any link on page.

  Does xsl has any function that will check for element existence? OR
  How can we check for null object in xsl?  The above condition is
checking
for blank value.

  Anybody has idea about this problem?

  Thanks in advance.







 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