[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: root siblings contain xmlns=""

Subject: RE: root siblings contain xmlns=""
From: christoph.klocker@xxxxxx
Date: Mon, 12 Jun 2006 12:04:37 +0200
klocker
Hi Mike,

tried to follow your advice and declared the namespace in the stylesheet
element.
unfortunately I still get the wrong output.
below my testfiles.

test.xml:
<test >
    <element1>test</element1>
    <element2>test</element2>
</test>

test.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"  xmlns="a-namespace-uri"
exclude-result-prefixes="xs">
    <xsl:template match="node()|@*">
        <xsl:copy>
            <xsl:apply-templates/>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="test">
        <Fxml Version="2_0_2">
            <xsl:apply-templates/>
        </Fxml>
    </xsl:template>
</xsl:stylesheet>

output:
<?xml version="1.0" encoding="UTF-8"?><Fxml xmlns="a-namespace-uri"
Version="2_0_2">
    <element1 xmlns="">test</element1>
    <element2 xmlns="">test</element2>
</Fxml>

my desired output:
<?xml version="1.0" encoding="UTF-8"?><Fxml xmlns="a-namespace-uri"
Version="2_0_2">
    <element1>test</element1>
    <element2 >test</element2>
</Fxml>

thx Christoph




This message and any attachment ("the Message") are confidential. If you are
not the intended recipient any use is strictly prohibited. If you have
received the Message in error, please notify the sender immediately and delete
the Message from your system, any use is forbidden. Correspondence via e-mail
is primarily for information purposes. KAG/RVG/RIFA/ImmoKAG neither makes nor
accepts legally binding statements unless otherwise agreed to the contrary

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.