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

Problem caused by Name space

Subject: Problem caused by Name space
From: Jeff Nester <jeff.nester@xxxxxxx>
Date: Mon, 21 Oct 2002 12:02:49 -0400
jeff nester
Hi,

I have a SOAP document that is being returned back to me that I want to use XSLT to format for display on my web page. I am getting the SOAP content from a 3rd party and don't have control over it. Here is a snippet of the SOAP xml:

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope">
 <soap:body>
  <eraRequest xmlns="http://www.somewhere.com/era">
    <uri>data</uri>
    <parameters>
      <data>4</data>
    </parameters>
  </eraRequest>
 </soap:body>
</soap:envelope>

I am using this:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
root
<xsl:apply-templates select="//parameters"/>
</xsl:template>
<xsl:template match="parameters">
parameters
<xsl:apply-templates select="//data"/>
</xsl:template>
<xsl:template match="data">
data: <xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>


Here are my questions:

1st) The XSLT never finds anything below root. If I specify a prefix in the eraRequest xmlns section then everything works correctly. Is there a way to write the XSLT so that it doesn't need the prefix to local the <data>?

2nd) is the statement <eraRequest xmlns="http://www.somewhere.com/era"> in the xml legal? do you not have to put a prefix with the name space?


-- ----------------------------------------------- Jeff Nester Sun Microsystems - Sun ONE Software Division

work:     (888) 733-0328
internal: x68268
email:    jeff.nester@xxxxxxx
-----------------------------------------------



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


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.