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

Problems with outputing namespaces

Subject: Problems with outputing namespaces
From: Charlie Consumer <faceless1976@xxxxxxxxx>
Date: Fri, 9 Dec 2005 08:53:24 -0800 (PST)
networkprotector
Hi,

I'm doing a XML to XML transformation with a
stylesheet.  The problem I'm having it that the xmlns
attribute is being outputted differently than it came
in.  So before it looks like:

<policy
xmlns="http://www.foo.net/cml/NetworkProtector/fwm"
... >

after it looks like:

<fwm:policy
xmlns:fwm="http://www.foo.net/cml/NetworkProtector/fwm"
...>

I'm using the JDK 1.5 JAXP 1.3 which is XSLTC as my
stylesheet library.  Previous I had been using XALAN. 
Here is the first portion of my stylesheet:

<xsl:stylesheet version="1.0"
xmlns:npcommon="http://www.foo.net/cml/NetworkProtector/common"
xmlns:fwm="http://www.foo.net/cml/NetworkProtector/fwm"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
   <xsl:output encoding="UTF-8" indent="yes"
method="xml"/>

   <xsl:template match="fwm:policy">
   <xsl:variable name="nodesToMesh"
select="$localMesh/member[not(@component=$localComponent)
and not(@removed)]"/>
   
   <xsl:element name="policy"
namespace="http://www.foo.net/cml/NetworkProtector/fwm">
     <xsl:copy-of select="@*"/>
     <xsl:apply-templates mode="access"
select="$nodesToMesh"/>
     <xsl:apply-templates select="fwm:Policy"/>
     <xsl:apply-templates mode="ipsec"
select="$nodesToMesh"/>
     <xsl:apply-templates select="fwm:IPSECRules"/>
     <xsl:apply-templates select="fwm:CommonLists"/>
     <xsl:apply-templates
select="fwm:SecurityGateways"/>
     <xsl:apply-templates select="fwm:MessageConfig"/>
     <xsl:apply-templates
select="fwm:ProxyRedirectRule"/>
     <xsl:apply-templates
select="fwm:VpnAdvancedSettings"/>
     <xsl:apply-templates select="fwm:TuningSetting"/>
   </xsl:element>
</xsl:template> 

What I'm trying to accomplish is just no prefixes with
fwm: and my xmlns attribute to carry no xmlns:fwm, but
instead be just xmlns.  Why is this not working?

Thanks
Charlie


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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.