XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
J RobertsSubject: SS5.0-127b: SXL XML not viewable in IE
Author: J Roberts
Date: 21 Aug 2003 02:06 PM

I have XSL document for my XML document. I wish to open the XML document and have it format to the XSL.

This all works fine within Stylus Studio, but when I "Preview in Internet Explorer" I get an error:

Keyword xsl:sort may not be used here

The only problem with this error, is that I am not using xsl:sort in my XSL (nor in the XML).

I have found other problems when xsl:sort is used. For example: when using <xsl:sort case-order="upper-first" lang="en" select="@Number"/>, Stylus Studio reports that "The case-order attribute is not yet implemented."

Additionally, strange errors/restrictions arise when using lang values of 'en' 'en-us' 'xml:en' etc. Some of these are allowed, and others give errors, but wrong recommendations are made within the tool (to use xml:en).

Is there something I'm doing wrong?

Thanks,
- J. Roberts

----------
Configuration:
SS5.0-127b
IE6.0.2800.1106-SP1
Win2000proSP4

Postnext
Minollo I.Subject: Re: SS5.0-127b: SXL XML not viewable in IE
Author: Minollo I.
Date: 21 Aug 2003 02:20 PM

>...
>The only problem with this error, is that I am not using xsl:sort in my
>XSL (nor in the XML).

Can you send us the XSLT and XML files that you are using when this error
happens?

>I have found other problems when xsl:sort is used. For example: when
>using <xsl:sort case-order="upper-first" lang="en"
>select="@Number"/>, Stylus Studio reports that "The case-order
>attribute is not yet implemented."

Yes, case-order is not supported by the Stylus Studio processor; you can
switch to XalanJ or Saxon as your debugger/processor in that case.

>Additionally, strange errors/restrictions arise when using lang values of
>'en' 'en-us' 'xml:en' etc. Some of these are allowed, and others give
>errors, but wrong recommendations are made within the tool (to use xml:en).

Again, a testcase would help understanding this; do the problems go away if
you select XalanJ or Saxon in the "Processor" tab of the scenario dialog?

Minollo

Postnext
J RobertsSubject: Re: SS5.0-127b: SXL XML not viewable in IE
Author: J Roberts
Date: 21 Aug 2003 10:34 PM
Dear Minollo,

Thank you for your reply. After thinking I was crazy, even after clearing temporary files within IE, I could not get rid of the error about xsl:sort. I renamed both the XML and XSL files to get past IE caching something from many moons ago (back when I had tried to use xsl:sort).

I now get the true error (which is too generic to help me):


The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document.


Since this error can pop-up for undefined entities, I looked for things like " " and others. I found none.

I will send you my files. Thanks for your help.

- J. Roberts

Postnext
Minollo I.Subject: Re: SS5.0-127b: SXL XML not viewable in IE
Author: Minollo I.
Date: 21 Aug 2003 10:41 PM
Actually that error is saying that your XSLT document has not root element
or it is non-well formed; if it was a matter of missing entity definition,
you would get the proper error.

I guess I'll understand more when you send me the files.

Minollo

Postnext
Minollo I.Subject: Re: SS5.0-127b: SXL XML not viewable in IE
Author: Minollo I.
Date: 21 Aug 2003 11:08 PM
Jeremy, thanks for the testcase.

I've been able to open the .xsl file in Stylus and preview it without any
problem; it works fine.
I have been able to reproduce the error you are talking about by opening
the .xml file and then asking XML editor to provide a IE preview of the
..xml file; that's when I get the error you mentioned.

Note that the two processes above described are pretty different:
- if you open a .xsl inside Stylus, you will enter the XSLT editor, where
you are able to debug and preview your stylesheet - specifying which XML
source the processor should use; in the same context you can choose to use
the internal Stylus processor, XalanJ or Saxon - all of them support step
by step debugging;

- if you open a .xml file inside Stylus, you will enter the XML editor,
whose goal is to let you edit/inspect the details of an XML document and
(possibly) associated schema. The "preview" button in XML editor gives you
a chance to have IE "interpret" your XML document and render it. This is
mostly useful if you have a .svg file, or any other XML document which IE
is able to render in a peculiar way. In your specific case, your XML
document contains a {?xml-stylesheet...?} PI, which instructs IE to display
the result of XSLT transformation where the XSLT source is specified in the
PI and the XML source is the one which is open in the XML editor. In that
case you are entirely relying on the IE (MSXML) processor, and we don't
have control on that. In your particular case it looks like the href
attribute in the {?xml-stylesheet...?} PI is pointing to an XSLT document
that cannot be retrieved - that's why you get the error you mentioned.

Hope this helps,
Minollo

Postnext
J RobertsSubject: Re: SS5.0-127b: SXL XML not viewable in IE
Author: J Roberts
Date: 08 Sep 2003 01:06 PM
Thanks for your help.

As it turns-out, the problem was a red herring for what my poor coordination of getting you the files, and checking different files on my system.

I did discover the real issue, but I'm not sure why it is the case:

When an XML file, that has an associated XSL file, contains:

<myRoot xmlns="http://www.someplace.com/stuff">

... then the XML file is displayed with the proper formatting as defined in the XSL -- however, it has no content from the XML file.

In otherwords, it is formatted and pretty (if output was HTML, for example), but none of the element or attribute values are populated into the final visible output.

Now, if the root is changed to:

<myRoot xmlns:xx="http://www.someplace.com/stuff">

... with a namespace qualifier, or simply ...

<myRoot>

... then everything works great, and the XML is formatted and populated.

Why does it fail when a default namespace is defined?

Thanks a bunch,
J. Roberts

Postnext
Richard CrawfordSubject: Richard Crawford FedEx Trade Networks is out of the office.
Author: Richard Crawford
Date: 08 Sep 2003 01:12 PM
I will be out of the office starting 08/29/2003 and will not return until
09/15/2003.

I will be reading e-mail in the evenings and will respond to your message.

If you require immediate attention please e-mail EC_Support@fedex.com

Postnext
(Deleted User) Subject: Re: SS5.0-127b: SXL XML not viewable in IE
Author: (Deleted User)
Date: 08 Sep 2003 01:39 PM
Hi Jeremy,

At 13.29 08/09/2003 -0400, you wrote:
>From: "J Roberts"
>
>[...]
>When an XML file, that has an associated XSL file, contains:
>
><myRoot xmlns="http://www.someplace.com/stuff">
>
>... then the XML file is displayed with the proper formatting as defined
>in the XSL -- however, it has no content from the XML file.
>
>[...]
>Now, if the root is changed to:
>
><myRoot xmlns:xx="http://www.someplace.com/stuff">
>
>... with a namespace qualifier, or simply ...
>
><myRoot>
>
>... then everything works great, and the XML is formatted and populated.
>
>Why does it fail when a default namespace is defined?

If you are seeing this behavior, it means that the XSL file that you are
using is not handling the correct namespace.
In the first case, in fact, you are defining a default namespace
("http://www.someplace.com/stuff") where all the XML elements will be
placed. So, the XSL should try to use queries picking the data out of that
namespace, for instance:

<xsl:stylesheet xmlns:stuff="http://www.someplace.com/stuff" ....
....
<xsl:value-of select="/stuff:myRoot">

In the two cases you list as working, you are either associating the
namespace URI to a prefix ("xx") that you are not using, or not defining a
namespace at all; in these cases, the XML elements will not be placed in a
namespace, and queries like "/myRoot" succeed.

Hope this helps,
Alberto

Posttop
J RobertsSubject: Re: SS5.0-127b: SXL XML not viewable in IE
Author: J Roberts
Date: 08 Sep 2003 02:51 PM
Alberto,

Thank you very much for the explanation. Now it's a bit more clear. I think I can take it from here.

Much appreciated,
- J. Roberts

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.