You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Neil de Hoog <ne...@lunatech.com> on 2000/07/24 23:00:08 UTC
bug in MixedContentModel.whatCanGoHere?
Sorry if this is old stuff. In the MixedContentModel.whatCanGoHere
method I read:
//
// If the fully valid parameter is set, then whether any
child can
// go here is dependent upon the content model having been
valid all
// the way to the end. If its not, nothing we put here is
going to
// make it happy. If it was ok, then nothing we put here is
ever going
// make it bad.
//
// So set up a boolean that can be used to set every possible
child's
// insertable status below.
//
boolean bStatus = true;
if (fullyValid && (failedIndex < info.childCount))
bStatus = false;
Why, if (failedIndex == -1) which means the current content is ok,
should bStatus be false? Doesn't
if (fullyValid && (failedIndex != -1))
do a better job? Or am I wrong in assuming the results array in the
InsertableElementsInfo indicates whether a certain element can be
inserted or not?
Neil de Hoog
strange entity declaration parsing
Posted by Neil de Hoog <ne...@lunatech.com>.
I get a strange parsing result from the document shown below.
The first ulink gives me:
prefix = ulink url="http
localpart = ://sit
rawname = ulink
uri =
null
The second ulink gives me:
prefix = null
localpart = ulink
rawname = ulink
uri =
null
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article SYSTEM "/opt/xml/simple-docbook/sdocbook.dtd" [
<!ENTITY neil '<ulink url="http://site.neil/">here</ulink>'>
]>
<article>
<para>And &neil; we will find everything we always wanted to
have.</para>
<para>And <ulink url="http://site.neil/">here</ulink> we will find
everything we always wanted to have.</para>
&testpara;
</article>
I get the impression that something is misbehaving while parsing entity
declarations. Possibly Stringreader which does something when it meets a
':'.
--
Neil de Hoog
neil@lunatech.com
neil@v2.nl