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

RE: data vs. xml

Subject: RE: data vs. xml
From: "Avula, Raj" <ravula@xxxxxxxxxxx>
Date: Thu, 3 Apr 2003 09:43:43 -0800
RE:  data vs. xml
First of all your xml. Comma is not allowed in QName.

Other wise, I think you can do it using simple XSL.

  <xsl:template match="node">
		<xsl:for-each select="node()">
			<xsl:value-of select="concat('&lt;', name(),
'&gt;')" disable-output-escaping="no" />
			<xsl:value-of select="." />
			<xsl:value-of select="concat('&lt;', name(),
'/&gt;')" disable-output-escaping="no" />
		</xsl:for-each>
  </xsl:template> 


Goodluck
Raj..
-----Original Message-----
From: bix xslt [mailto:bix_xslt@xxxxxxxxxxx]
Sent: Thursday, April 03, 2003 9:03 AM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  data vs. xml


All,

Is there a way to identify a node as containing cdata?

eg.
<node>
<dataNotNewXMLTag1, dataVala, dataValb, moreData, ...>
<dataNotNewXMLTag2, dataVala, dataValb, moreData, ...>
<dataNotNewXMLTag3, dataVala, dataValb, moreData, ...>
<dataNotNewXMLTag4, dataVala, dataValb, moreData, ...>
<dataNotNewXMLTag5, dataVala, dataValb, moreData, ...>
</node>

I want to write a simple xsl script that would translate the above into 
something more manageable for XSLT processing:

eg.
<node>
&lt;dataNotNewXMLTag1, dataVala, dataValb, moreData, ...&gt;
&lt;dataNotNewXMLTag2, dataVala, dataValb, moreData, ...&gt;
&lt;dataNotNewXMLTag3, dataVala, dataValb, moreData, ...&gt;
&lt;dataNotNewXMLTag4, dataVala, dataValb, moreData, ...&gt;
&lt;dataNotNewXMLTag5, dataVala, dataValb, moreData, ...&gt;
</node>

I had tried something like this:
<x:template match="node">
  <x:element name="node">
     <x:variable
         name="start"
         select="translate(exslt:node-set(.),"<","&lt;")">
     <x:variable
         name="end"
         select="translate(exslt:node-set($start),"<","&lt;")">
     <x:copy-of select="exslt:node-set($end)"/>
  </x:element>
</x:template>

But that really didn't work well, producing an error.

Any help would be appreciated!

Thanks,
bix





_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


 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
  • data vs. xml
    • bix xslt - Thu, 3 Apr 2003 12:10:44 -0500 (EST)
      • <Possible follow-ups>
      • Passin, Tom - Thu, 3 Apr 2003 12:28:56 -0500 (EST)
      • Avula, Raj - Thu, 3 Apr 2003 12:40:07 -0500 (EST) <=
      • bix xslt - Thu, 3 Apr 2003 12:50:30 -0500 (EST)

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.