|
Subject: [xsl] changing from no namespace to a namespace From: Jim_Albright@xxxxxxxxxxxx Date: Thu, 3 Apr 2008 16:49:25 -0400 |
I have a document starting:
<?xml version="1.0" encoding="UTF-8"?>
<osis>
<osisText type="x-Wycliffe-1.0" osisIDWork="WBT.seh" xml:lang="seh"
canonical="true">
<header>
and want it to be:
<?xml version="1.0" encoding="UTF-8"?>
<osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace">
<osisText type="x-Wycliffe-1.0" osisIDWork="WBT.seh" xml:lang="seh"
canonical="true">
<header>
but I keep getting xmlns="" added
<?xml version="1.0" encoding="UTF-8"?>
<osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace">
<osisText xmlns="" type="x-Wycliffe-1.0" osisIDWork="WBT.seh"
xml:lang="seh"
canonical="true">
<header>
-----
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0"
xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace"
>
<xsl:output indent="yes"/>
<xsl:template match="osis">
<osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace
">
<xsl:apply-templates/>
</osis>
</xsl:template>
<!-- identity transformation -->
<!-- Whenever you match any node or any attribute -->
<xsl:template match="node()|@*">
<!-- Copy the current node -->
<xsl:copy>
<!-- Including any attributes it has and any child nodes -->
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:transform>
Jim Albright
704 843-0582
JAARS, Speeding Bible Translation
Wycliffe, Partners in Bible Translation
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] New SourceForge Project: , Michael Kay | Thread | Re: [xsl] changing from no namespac, David Carlisle |
| Re: [xsl] New SourceForge Project: , Jim Earley | Date | Re: [xsl] changing from no namespac, David Carlisle |
| Month |