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

undeclared namespace ?

Subject: undeclared namespace ?
From: Arthur Maloney <ArthurMaloney@xxxxxxxxxx>
Date: Mon, 16 Feb 2004 10:18:50 +0000
xsl is an undeclared namespace
Hello xsl-list,

How does namespace work?

File.xml transformed with StyleSheet1:
Gives Error:
xml transformation failed due the following error
Reference to undeclared namespace prefix: 'str'.


Stylesheet1 includes Stylesheet2 includes StyleSheet3

If I drop str: from  <xsl:call-template name="str:change-case"> (StyleSheet1) and
the the named template in StyleSheet3. Then it all works fine?




--------------
StyleSheet1    Has include for StyleSheet2

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                        xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:include href="util_vb6.xsl" />
<xsl:output method="text" />

<!-- Main entry point. -->
<xsl:template match="/">

   <xsl:call-template name="str:change-case">
      <xsl:with-param name="value" select="'KP'"/>
   </xsl:call-template>
...

-----------------
StyleSheet2:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include  href="D:\Seipas\OOSAD\DBDesign4\StyleSheets\util-strings.xsl" />
...

-----------------
StlyeSheet3:  Note namespace xmlns:str

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:str="http://www.seipas.com/namespaces/strings" 
         extension-element-prefixes="str">

<!--util-strings.xsl-->
<!--Utility for string-handling functionality.-->

<!-- Change case -->
<xsl:template name="str:change-case">
   <xsl:param name="value"/>
   <xsl:param name="case" select="'lower'"/>
      <xsl:choose>
         <xsl:when test="$case='lower'">
            <xsl:value-of select="translate($value,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') "/>
         </xsl:when>
         <xsl:when test="$case='upper'">
            <xsl:value-of select="translate($value,  'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
         </xsl:when>
         <xsl:otherwise>
             <!--Incorrect change-to passed in. So just return the original string--> 
            <xsl:value-of select="$value"/>
         </xsl:otherwise>
      </xsl:choose>
</xsl:template>
...



-- 
Best regards,
 Arthur                          mailto:ArthurMaloney@xxxxxxxxxx


 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.