|
Subject: Re: [xsl] Global namespace prefixes (Corrected Examples) From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 14 Nov 2008 15:16:09 -0500 |
<xsl:stylesheet xmlns:dap="http://xml.opendap.org/ns/DAP/3.2#" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method='xml' version='1.0' encoding='UTF-8' indent='yes'/>
<xsl:template match="dap:Dataset" >
<output>
<xsl:attribute name="{$prefix}:ns" namespace="{$ns}">
<xsl:value-of select="$ns"/>
</xsl:attribute>
<xsl:apply-templates />
</output>
</xsl:template> <xsl:template match="dap:Attribute" >
<xsl:element name="{$prefix}:{@name}" namespace="{$ns}">
<xsl:value-of select="." />
</xsl:element>
</xsl:template>Cheers, Wendell
====================================================================== 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] Global namespace prefixes, Nathan Potter | Thread | Re: [xsl] Global namespace prefixes, Nathan Potter |
| Re: [xsl] Global namespace prefixes, Nathan Potter | Date | Re: [xsl] Global namespace prefixes, Nathan Potter |
| Month |