|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








