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

Value-of, copy-of

Subject: Value-of, copy-of
From: Eric Vitiello <xsl-list@xxxxxxxxxxxx>
Date: Wed, 27 Feb 2002 09:23:41 -0500
value of copy of
ok.

so awhile back we had a somewhat heated discussion of value-of/copy-of, and where the line is drawn between content and structure.

taking the discussion to heart, I evaluated my practice of using CDATA blocks to enclose data which I felt was not part of the structure, and using value-of, with disable-output-escaping="yes", and have switched some of my data to a CDATA-less layout, and I'm attempting to convert the style sheets to use copy-of.  I have the following XML (this is a small portion of it):

<?xml version="1.0"?>
	<rdf:RDF 
		xmlns:dc="http://purl.org/dc/elements/1.1/" 
		xmlns="http://purl.org/rss/1.0/" 
		xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
		xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
		<item>
			<title>Rebuilding of the website</title>
			<description>
				<p>this website has now been rebuilt.  We're using an all-css all-the-time layout.  The backend articles is now in formatted with <acronym title="Resource Description Format">RDF</acronym>, ready for syndication.</p>
			</description>
			<dc:date>2002-02-26</dc:date>
			<dc:language>en</dc:language>
			<dc:source></dc:source>
			<dc:creator></dc:creator>
			<dc:contributor>Eric</dc:contributor>
		</item>		
	</rdf:RDF>


the chunk of XSL in question is:

<div class="blurb">
<xsl:copy-of select="rss:description"/>
</div>

my problem is that the processor output is:

<div class="blurb">
<description xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
<p>this website has now been rebuilt.  We're using an all-css all-the-time layout.  The backend articles is now in formatted with <acronym title="Resource Description Format">RDF</acronym>, ready for syndication.</p>
</description>
</div>


I don't want it to output the <description> elements, only the content inside.

I've tried using child::rss:description  and descendant::rss:description, but I get exactly the same output.  I'm also a bit annoyed by it putting the namespace declarations in the output, but I think it's probably a simple namespace mixup.

I have the following namespaces defined in the XSL:

<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:rss="http://purl.org/rss/1.0/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns="http://www.w3.org/1999/xhtml">


I wasn't able to find anything dealing with this value-of and copy-of issue anywhere.

I'm just learning to deal with namespaces, so bear with me!


---
Eric Vitiello
Perceive Designs
<www.perceive.net>



 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.