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

ACCESSING SPECIFIC CDATA FIELD

Subject: ACCESSING SPECIFIC CDATA FIELD
From: <viniciuscamara@xxxxxxxxxxxx>
Date: Tue, 13 Dec 2005 13:07:06 -0300
cdata accessing
Hello Fellows,
I've one XML and trying to access the specific CDATA on XML but when do
this, I capture all CDATAs nodes. See the XML and XSL code bellow:

// -----------------------------xml -----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<scripts>
  <etps total="1">
      <etp id="200">
          <![CDATA[Trying accessing only this]]>
          <nvgs>
              <nvg id="201"><![CDATA[blablablablabla]]></nvg>
              <nvg id="202"><![CDATA[blablablablabla]]></nvg>
          </nvgs>
      </etp>
  </etps>
</scripts>

// -----------------------------xsl -----------------------------
//code's resume
<xsl:choose>
<xsl:when test="scripts/etapas/@total>0">
<table width="100%" id="SCRIPT">
  <tr valign="top" style="font-weight:bold;">
      <th width="40%">etp</th>
      <th width="20%">nvg</th>
  </tr>

<xsl:for-each select="scripts/etapas/etapa">
 <tr valign="top">
      <td comment="ETP">
          <xsl:value-of select="."/><br/> <!--When I put the prefix "."
           <!--the XSL return all CDATA nodes, including "nvgs"-->
           <!--
              This will be return to me
              Trying accessing only this + blablablablabla +
blablablablabla
          -->
  </td>
  <td  comment="NVG">
      <xsl:for-each select="nvgs/nvg">
          <xsl:value-of select="@id"/><br/>
      </xsl:for-each>
  </td>
   </tr>
</xsl:for-each>

Is it necessary to create a node to CDATA ?

Thanks a lot!
Best regards!

Vinicius Cbmara de Oliveira
viniciuscamara@xxxxxxxxxxxx







_______________________________________________________ Yahoo! doce lar. Faga do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html


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.