|
Subject: Re: [xsl] XHTML to XHTML transform From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 02 Apr 2004 17:24:06 -0500 |
<xsl:template match="nbn:link">
<xsl:element name="A">
<xsl:attribute name="HREF">/<xsl:value-of
select="$controller"/>/module/<xsl:value-of
select="nbn-var:location/nbn-var:module" />/action/<xsl:value-of
select="nbn-var:location/nbn-var:action" />/</xsl:attribute>
<xsl:attribute name="ID"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:attribute name="CLASS">menuitem</xsl:attribute>
<xsl:value-of select="@name"/>
</xsl:element>
<xsl:apply-templates />
<BR/>
<xsl:if test="link">
<xsl:element name="DIV">
<xsl:attribute name="CLASS">submenu</xsl:attribute>
<xsl:apply-templates select="link"/>
</xsl:element>
</xsl:if>
</xsl:template>
<xsl:template match="link">
<DIV CLASS="submenu">
<!-- plus whatever else happens to 'link'...
apply-templates, copy or whatever -->
</DIV>
</xsl:template>Cheers, Wendell
How do I match text nodes in my custom namespace? As in override the default text node template for "mynamespace"?
All my variables <mynamespace:name>blah</mynamespace:name> for instance appear as text in the results, I've tried this:
<xsl:template match="text()[namespace-uri()='mynamespace:namespace']"> </xsl:template>
but that doesn't work... I ended up changing all the elements I want hidden under all circumstances to the mynamespace-var namespace...
<xsl:template match="*[namespace-uri()='mynamespace-var:namespace']"> </xsl:template>
This works, but I think its messy, I was wondering if there was a better way? I'm pasting my code below.
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] XHTML to XHTML transform, Andreas L. Delmelle | Thread | RE: [xsl] XHTML to XHTML transform, Michael Kay |
| RE: [xsl] XHTML to XHTML transform, Andreas L. Delmelle | Date | RE: [xsl] XHTML to XHTML transform, Michael Kay |
| Month |