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

Re: xhtml DOCTYPE problem

Subject: Re: xhtml DOCTYPE problem
From: Steven Noels <stevenn@xxxxxxxxxxxxxxxx>
Date: Thu, 17 Jan 2002 04:51:13 -0600 (CST)
xsl xhtml doctype
On Thu, 17 Jan 2002, Houbrechts Ivo wrote:

> I have a simple xhtml document:
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!DOCTYPE html SYSTEM "xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
>   <head>
>     <title>my title</title>
>   </head>
>   <body>
> 	<p>para</p>
>   </body>
> </html>
> Following template only outputs an emptye <test/>:
> <xsl:template match="/">
> 	<test>
> 	<xsl:value-of select="html/head/title"/>
> 	</test>
> </xsl:template>

you are trying to match elements which reside in the (default) xhtml 

add a namespace declaration to your stylesheet element and you should be 

<xsl:stylesheet xmlns:xsl="..." xmlns:xhtml="http://www.w3.org/1999/xhtml" 

and then change your pattern to:

<xsl:value-of select="xhtml:html/xhtml:head/xhtml:title"/>

> Notes:
> -I tried this with both xalan and saxon
> -I had to change the DOCTYPE to SYSTEM and store the dtd locally, otherwise
> the xslt-processor cannot find it.

There's a number of work-arounds for that, but largely depending on your 

Steven Noels

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.