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

Re: transforming xhtml question

Subject: Re: transforming xhtml question
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 24 Mar 2003 09:51:15 GMT
Re:  transforming xhtml question
<xsl:template match="/">
    <xsl:apply-templates select="//html"/>

even when that works you don't want to do that: //html means search teh
entire document tree and find all elements called head, at any depth in
the tree. This is -slow_. If you want to find an element called html
in no namespace that is a child of the current / node you want
<xsl:apply-templates select="html"/>

however

> I'm having problems navigating to the html elment and other elements
> when I leave the Doctype and namespace at the top of the xhtml doc. 

this is a FFFAQ.

To match in the xhtml namespace (which is defaulted buy teh xhtml dtd
even if you don't make it explicit) you need
to declare the xhtml namespace in your stylesheet
with something like xmlns:h="http://www.w3.org/1999/chtml" then use
h:html rather than html etc.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.