You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by charlie <cf...@thesaberfund.com> on 2000/06/14 11:24:38 UTC

2 Bugs in XSLTEngineImpl::process

I apologize if this isn't the place to post this, but I can't access the
bug database.


There are two bugs in the method XSLTEngineImpl::process.

Line 414:

      StringTokenizer  tokenizer(child->getNodeValue(),
XALAN_STATIC_UCODE_STRING(" \t="), true);

And line 434:

       StringTokenizer  tokenizer(child->getNodeValue(),
XALAN_STATIC_UCODE_STRING(" \t="), true);

are both incorrect.  The problem is in the last parameter, which is set
to "true" in both case.  True means to create a string tokenizer that
returns all tokens, including even separators (which are specified in
the next to last parameter).

However, if you look through the code you'll see that it is trying to
find the type and href attributes inside of an embedded style sheet
processing instruction, which looks like:

<?xml-stylesheet type="text/xsl" href="..."?>

Once it finds an attribute it will then call tokenizer.nextToken.
Unfortunately, since the tokenizer's are returning separators you get
back "=" as opposed to the value.

The fix is simple, the in both cases the last parameter should be set to
"false" not "true."


Charlie Savage