Re: [xsl] Transform xhtml to xhtml, convert one tag to another, while preserving rest of file

Subject: Re: [xsl] Transform xhtml to xhtml, convert one tag to another, while preserving rest of file
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 8 Feb 2005 17:07:11 GMT
> The XHTML documents did include 
> the doctype definition, but for as far as I know this doesn't mean that 
> all elements are in the XHTML namespace,

Bingo!

The XHTML DTD uses the ability of a DTD to default attributes and does
default a namespace declaration.

> But there's something else. Almost all of the elements in my page now 
> appear with the empty attribute xmlns, like:
> 
> <p xmlns=""></p>
> 
> for example. Why is this?

Another faq. You are generating an html element (not a tag by the way)
in the xhtml namespace and then a p element in no-namespaace. 
The easiest way to avoid that is to put teh namespace declaration for
xhtml on the xsl:stylesheet element so it is in scope for the whole
stylesheet.

> Maybe I should post the files on the web so someone (with a lot of time 
> on his/her hands and a very helpful attitude) could take a look at them.

better is to make a six line example input and minimal stylesheet that
doesn't work as you expect and paste it inline into the message.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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
________________________________________________________________________

Current Thread