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

Re: Re: Re: Re: Converting specific child elements int

Subject: Re: Re: Re: Re: Converting specific child elements into att riutes of parent
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Mon, 3 Nov 2003 21:08:53 +0100
java.net.malformedurlexception unknown protocol e
> This did not give the error and resulted in expected results.  I could get
> the result with JRE itself i.e., without having to specify
> the -Xbootclasspath/p flag.  Does that mean XalanJ 2.4.1, Saxon 6.5.3,
> MSXML3, etc are suppressing this error? Whether the processors which issue
> this error are XSLT compliant or is it the otherway?
>
> Thanks to all for spending your time on this and helping to resolve this.

There *was* an error in my solution.

This:

      <xsl:when test="not(name() = $elNames)">
        <xsl:copy>
          <xsl:copy-of select="@*"/>
          <xsl:apply-templates select="*[name() = $elNames]"/>
          <xsl:apply-templates/>
        </xsl:copy>
      </xsl:when>

is applying templates first to all elements, whose name is one of the names
listed in $elNames. Then it is applying templates to all children of the
current node (in document order). So templates are applied for a second time
to the children of the current node, whose name is listed in $elNames. If
there are other children before these in document order, applying templates
to them will "close the element" and then when a child element with a name
listed in $elNames is processed, this will attempt to create an attribute
when no element node is "in the process of creation"

This explains the error messages, which are correct.

The above snippet must be replaced by:

      <xsl:when test="not(name() = $elNames)">
        <xsl:copy>
          <xsl:copy-of select="@*"/>
          <xsl:apply-templates select="*[name() = $elNames]"/>
          <xsl:apply-templates
               select="node()[not(name() = $elNames)]"/>
        </xsl:copy>
      </xsl:when>

Now all XSLT processors I have installed with the exception of one perform
the transformation without any error messages -- Saxon 6.5.3, Saxon 7, Xalan
C 1.5, .Net xslTransform, MSXML3/4, JD, 4xslt, xsltProc

The only xslt processor, which simply crashes is XalanJ 2.4.1. I get the
following message:

">>>>>>> Xalan Version Xalan Java 2.4.1, <<<<<<<

(Location of error unknown)XSLT Error
(javax.xml.transform.TransformerConfigurationException):
javax.xml.transform.TransformerException: java.net.MalformedURLException:
unknown protocol: e"



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL







 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.