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

Re: More on my problem with namespaces

Subject: Re: More on my problem with namespaces
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 09 Nov 2010 17:27:31 +0100
Re:  More on my problem with namespaces
Nick Leaton wrote:
Using Saxon, I get this error message going the second route.

[Saxon-PE 9.2.0.6] Element type "calypso:value" must be followed by
either attribute definitions, ">" or "/>"
@see http://www.saxonica.com/documentation/javadoc/net/sf/saxon/trans/SaxonErrorCode.html#SXXP0003

xslt as follows

===============
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:calypso="http://www.calypso.com/xml"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns3="http://www.w3.org/2001/XMLSchema"
    version="2.0">

<xsl:output method="xml" indent="yes"/>

    <xsl:template match="/">
        <bonds>
            <xsl:for-each select="//isin">
            <bond>
                <calypso:secCode>
                    <calypso:name>ISIN</calypso:name>
                    <calypso:value xsi:type="ns3:string"
                        xmlns:ns3="http://www.w3.org/2001/XMLSchema"

You need to delimit the start tag with '>', that is all i.e.


                    <calypso:value xsi:type="ns3:string"
                        xmlns:ns3="http://www.w3.org/2001/XMLSchema">
                        <xsl:value-of select="."/>
                    </calypso:value>

that way the error should be fixed. I am not sure you will achieve your aim of having the namespace declared on each calypso:value element but fix the other problem first.

--

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

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.