cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stevens" <at...@hotmail.com>
Subject RE: Cocoon XSLT and schema documents
Date Fri, 27 Jan 2006 01:20:55 GMT
>>From: Martin Holmes <mholmes@uvic.ca>
>>Date: Thu, 26 Jan 2006 10:54:16 -0800
>>
>>Hi there,
>>
>>I have some XML documents (TEI P5) that start like this:
>>
>><TEI  xmlns="http://www.tei-c.org/ns/1.0"
>
>setting the element's namespace to http://www.tei-c.org/ns/1.0, I notice
>
>...
>>When XSLT transformations are run against them, no templates are applied, 
>>so plain text is all that shows up. However, when I remove all the 
>>attributes from the root element:
>>
>><TEI>
>>
>>the transformations work fine.
>
>My guess is your XSL tempates don't include the namespaces, so are looking 
>to match elements in the default (i.e. no) namespace?
>
><xsl:stylesheet xmlns:tei

Oops, hit the wrong key.  Should have been

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tei="http://www.tei-c.org/ns/1.0">
<xsl:template match="tei:TEI">
Matches.
</xsl:template>
<xsl:template match="TEI">
Doesn't match.
</xsl:template>
<xsl:template match="undeclared:TEI">
Doesn't match either.
</xsl:template>
</xsl:stylesheet>

or something along those lines.  Also keep in mind the actual prefixes used 
don't matter, it's the namespace URIs that need to match.


Andrew.



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


Mime
View raw message