DTDGenerator and empty attributes.

Paul Tchistopolskii paul at qub.com
Thu Sep 2 19:52:48 BST 1999


Thank you Michael,

I realy missed upgrading to SAXON 4.2.
I now upgraded to SAXON 4.5,  tested
it and everything works fine.

Shame on me not checking your
page for months - but there was no
bug reports!

Rgds.Paul.

PS. The upgraded DTDGenerator Frontend
runs at  http://www.pault.com/Xmltube/dtdgen.html

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 paul at pault.com   www.renderx.com   www.pault.com
 XMLTube * Perl/JavaConnector * PerlApplicationServer
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

> The source code has a comment saying that I fixed this problem on 20 April
> 99, so if it is still there in the latest SAXON release there is something
> wrong with my build or testing procedures! Paul, could you check you are
> using the latest version?
>
> > -----Original Message-----
> > From: Paul at Sunnyvale [mailto:paul at pault.com]
> > Sent: 31 August 1999 10:45
> > Cc: Michael.Kay at icl.com
> > Subject: DTDGenerator and empty attributes.
> >
> > Richard,
> >
> > Thank you for your bugreport.
> >
> > It appears that there is a problem with  DTDGenerator
> > caused by empty attributes.
> >
> > I have stripped your xml file to the smallest possible
> > fragment  which still causes the exception.
> >
> > #### Good file
> >
> > <XMLMessage>
> > <XMLMessageHeader UserId="1"/>
> > </XMLMessage>
> >
> > #### Output:
> >
> > Processing: C:\tmp\B.xml
> > <!ELEMENT XMLMessage ( XMLMessageHeader ) >
> >
> > <!ELEMENT XMLMessageHeader EMPTY >
> > <!ATTLIST XMLMessageHeader UserId NMTOKEN #REQUIRED >
> >
> > ### 'Bad' file
> >
> > <XMLMessage>
> > <XMLMessageHeader UserId=""/>
> > </XMLMessage>
> >
> > #### Output:
> >
> > Processing: C:\tmp\B.xml
> > java.lang.StringIndexOutOfBoundsException: String index out
> > of range: 0
> >  at java.lang.String.charAt(String.java)
> >  at DTDGenerator.isValidName(DTDGenerator.java:69)
> >  at DTDGenerator.access$0(DTDGenerator.java:67)
> >  at DTDGenerator$ElemHandler.startElement(DTDGenerator.java:290)
> >  at com.icl.saxon.Distributor.startElement(Distributor.java:249)
> >  at com.jclark.xml.sax.Driver.startElement(Driver.java)
> >  at com.jclark.xml.parse.EntityParser.parseContent(EntityParser.java)
> >  at
> > com.jclark.xml.parse.EntityParser.parseDocumentEntity(EntityPa
> > rser.java)
> >  at com.jclark.xml.parse.DocumentParser.parse(DocumentParser.java)
> >  at
> > com.jclark.xml.parse.base.ParserImpl.parseDocument(ParserImpl.java)
> >  at com.jclark.xml.sax.Driver.parse(Driver.java)
> >  at com.icl.saxon.Distributor.run(Distributor.java:111)
> >  at DTDGenerator.main(DTDGenerator.java:43)
> >
> > I'm crossposting this letter to Michael Kay  ( who is the
> > author of the
> > DTDGenerator ) I hope he would be so kind to add more on
> > this issue. My apologies to Michael if it was not a good idea.
> >
> > Rgds.Paul.
> >

> > > I am new to XML so my apologies if I am wasting your time.
> > I am attempting
> > > to set up a DTD and foun your page. I thought it would be a
> > good jumping
> > off
> > > point for writing a DTD. My sample XML file (written with
> > the aid of MS
> > XML
> > > Notepad) fails when passed to your online frontend. As you
> > requested, I am
> > > emailing you the source file and hope it may help both of
> > us to sort out
> > the
> > > problem.
> > >



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list