cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Quinn <aqu...@ebi.ac.uk>
Subject Re: matching html elements in transformation
Date Tue, 24 Aug 2004 09:01:36 GMT
Gary,

It sounds like a namespace problem.

Take a look at your HTML - if there's a DTD declaration you'll need to 
declare this is a namespace in your XSL file and prefix any HTML 
elements accordingly, eg:

HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
...

XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:html="http://www.w3.org/TR/html4/loose.dtd"
                 exclude-result-prefixes="html">
...
     <xsl:template match="html:a">
	...
     </xsl:template>
...

Cheers,

Antony

Schultz, Gary - COMM wrote:

> We are transitioning from a html web site to xml files that include html
> elements. We cannot get html elements to match in the xsl transformation.
> For example, we do not get a result for <xsl:template match="a"> or
> <xsl:template match="//a">. Are there any configuration changes that need to
> be made for this to work?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message