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

Namespace Problem

Subject: Namespace Problem
From: jaya vardhani <jayavardhani@xxxxxxxxxxx>
Date: Wed, 28 Sep 2005 06:20:30 +0100 (BST)
xsl xml namespace issue
Hi,
   
Could anyone help me out by giving a solution for the
following problem?
 
I am using XSLT to transform to a xml document. The
following is my xsl code snippet:
 
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" 
     xmlns=" http://integration.api.com"  xmlns:xenc="
http://www.w3.org/2001/04/xmlenc#" 
     xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
exclude-result-prefixes="fiHeader">
 
<xsl:import href="../Header.xsl"/>
 
<xsl:template match="selectrequest">
            <xsl:element name="fiAPI">
                <xsl:attribute
name="xsi:schemaLocation"> http://integration.api.com
DocumentInquiry.xsd</xsl:attribute>
                <!-- fiHeader -->
                <xsl:call-template name="header"/>
                <!-- Request --> 
                <xsl:element name="Request">
                    <xsl:call-template
name="DateClassType"/>
                    <xsl:call-template name="select"/>
                    <xsl:call-template
name="buildReqMetaData"/> 
                </xsl:element>
            </xsl:element>
        </xsl:template> 
</xsl:template>
 
The xsl also includes the definitions for all
templates except the "header" template which is called
from other xsl.
 
The output xml is as follows:
 
<fiAPI xmlns="http://integration.api.com" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:xenc=" http://www.w3.org/2001/04/xmlenc #"
xsi:schemaLocation=" http://integration.api.com
DocumentInquiry.xsd">
<fiHeader xmlns="" Version=" 2.0 ">
   .....
   .....
</fiHeader>
<Service Version="1.0" Name="ServArchiveAccessAPI"/>
<Request TypeOfRequest="DocumentInquiryRq"
RequestID="123" Echo="0">
             <Date>2005-09-20</Date>
             <Class>Check</Class>
             <Type>GetImage</Type> 
             <Condition>
                      <Detail>SerNum</Detail>
                      <Operator>EQ</Operator>
                      <Value>45445</Value>
              </Condition> 
...
...
</Request>
</fiAPI>
 
                   In the output xml's fiHeader
element i am getting one extra attribute xmlns.This
header is formed by calling a template from another
xsl.
If i include the namespace declaration in <xsl:element
name="fiAPI"> i am getting that xmlns attribute in all
the elements that are formed by calling templates.
I have tried various options with
exclude-result-prefixes but to no avail.
 
Thanking you in anticipation,
Jaya Vardhani M.




		
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.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.