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

namespaces and copying trees

Subject: namespaces and copying trees
From: Joern Clausen <joern@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 8 Aug 2001 18:01:00 +0200
 namespaces and copying trees
Hi!

Suppose, I have an XHTML document with some additional metadata, seperated
from the HTML by it's own namespace:


<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:foo="foonamespace">

  <foo:metadata>
     <foo:author>Joe User</foo:author>
     <foo:date>2001-08-07</foo:date>
  </foo:metadata>

  <head>
     ....
  </head>
  <body>
     ...
  </body>
</html>


Now I want (among other things) to generate an HTML version of this
file, without the metadata. How can I exclude everything in the "foo"
namespace?

For this specific case, this works (with the appropriate namespaces
declared in the stylesheet, of course):

  <xsl:template match="xhtml:html">
    <html>
      <xsl:copy-of select="xhtml:head"/>
      <xsl:copy-of select="xhtml:body"/>
    </html>
  </xsl:template>

But what if I want to allow metadata to appear at arbitrary places in
the XHTML document? I think there must be a more elegant way to say
"Take everything from this namespace, forget everything from all other
namespaces."


Thanks in advance,
   Joern

-- 
 Joern Clausen                                joern@xxxxxxxxxxxxxxxxxxxxxxxx
 Faculty of Technology           http://www.TechFak.Uni-Bielefeld.DE/~joern/
 Bielefeld University, Germany                           +49 (0)521/106-2905

 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.