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
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Brian HanrahanSubject: Parse Bug for external dtds
Author: Brian Hanrahan
Date: 10 Apr 2006 10:55 AM
I get the following error message

"Parsing error in file file:///...coke.dtd. Expected whitespace (line 2, column 11)"

when I navigate from the text view to
the tree view for the following EXTERNAL dtd.

<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY %key; "%value;">

The %key; and %value; parameter entities are declared in the Internal dtd as follows;

<?xml version="1.0"?>
<!DOCTYPE a SYSTEM "c:\Documents and Settings\...\coke.dtd" [
<!ENTITY % key "Coke">
<!ENTITY % value "Good">
<!ELEMENT a (#PCDATA)>]>
<a>&Coke;</a>


There should be no error message here. If <!ENTITY %key; "%value;"> were declared in an internal dtd, then yes, this would be an error. However, because it has been declared in an EXTERNAL dtd it should be fine. In the xml document the a element will contail the text "Good".

I'm using Stylus Studio 5.3/build 179g.
The same error occurs in the Stylus Studio 2006 Release 2 XML Enterprise Edition (evaluation).

Brian Hanrahan

P.S. This example comes coutesy of XML Essentials by Don Box, Aaron Skonnard and John Lam.

Postnext
Minollo I.Subject: Parse Bug for external dtds
Author: Minollo I.
Date: 10 Apr 2006 11:25 AM
Reading http://www.w3.org/TR/2004/REC-xml-20040204/#sec-entity-decl the syntax you have posted doesn't seem correct. I'm not aware of ways to define an ENTITY using another ENTITY's value as its name.

I don't have the publication you mention handy to double check, but I don't see how the DTD code you mention could be valid.

Minollo

Postnext
Brian HanrahanSubject: Parse Bug for external dtds
Author: Brian Hanrahan
Date: 10 Apr 2006 01:13 PM
Hi Minolo,

Internet Explorer has no problems with the above xml document.

Despite the parse error message from Stylus Studio, when I send the it to Internet Explorer it handles it correctly and displays
<a>Good</a>.

Don't you need to do entity replacement before you parse?

Brian Hanrahan

Postnext
Minollo I.Subject: Parse Bug for external dtds
Author: Minollo I.
Date: 10 Apr 2006 02:33 PM
Well, we dug a bit deeper (sections 4.4 and 4.4.8 of the same document I mentioned earlier); and we believe you are right. That syntax should work the way you expect.

Looking at the Apache XercesC code (which is the XML parser that Stylus Studio uses) we believe we have identified the problem; and we will work with the Apache community to address it.

The other validation engines embedded in Stylus Studio that support DTD validation seem to work fine with that syntax.

Thanks for pointing this out,
Minollo

Postnext
Brian HanrahanSubject: Parse Bug for external dtds
Author: Brian Hanrahan
Date: 10 Apr 2006 04:14 PM
Great News Minollo!

Hopefully you'll have a 5.3 maintenance release after you fix this.

I tried twice, over several months, to alert your competitor
of this bug, but got absolutely nowhere. I took you guys less than
one day to address it. Great Support.

Thanks.

Brian Hanrahan

Posttop
Minollo I.Subject: Parse Bug for external dtds
Author: Minollo I.
Date: 10 Apr 2006 04:28 PM
Good news is that the problem will be fixed in the coming 2006 Release 2 maintenance update (available later this month).

Bad news is that 5.3 is at this point unsupported (we are 2 releases later); you will be able to try 2006 release 2 for free for two weeks, but eventually you will need to upgrade if you want to keep using it. Feel free to contact stylusstudio@stylusstudio.com for details about the upgrade paths available to you.

If you are interested we can make a pre-release of BL591c (the next 2006 rel 2 maintenance update) available to you quickly.

Minollo

 
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.