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

RE: XML/XSL output

Subject: RE: XML/XSL output
From: "Américo Albuquerque" <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Wed, 11 Sep 2002 10:50:19 +0100
null in xsl
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:  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

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.