You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Abby Kehat <ab...@tradeum.com> on 2000/03/16 11:09:03 UTC

Xalan 0.2.0

Hi -

We are using Xalan version 0.2.0. I was wondering if you could answer a
couple of questions:

1) We have some old stylesheets which make heavy use of the normalize()
function, which strips leading and trailing whitespaces and normalizes
whitespace in the middle of the field (to one whitespace). This is from
the April 99 draft but doesn't seem to appear in the November 99 draft
(which this version of Xalan implements). Can you suggest an alternative
solution since some of our new xsl files that we are creating will need
to make use of this functionality?

2) The processor seems to drop closing tags in some cases. For example,
our xsl file has 

<img border="0" src="images/cleardot.gif" width="3" height="30" align="left"/>

Xalan seems to drop the closing '/', giving 

<img align="left" height="30" width="3" src="images/cleardot.gif" border="0">

(Additionally, notice that the attributes have been reversed.)

Our XML processor 'chokes' on this result, since it requires valid XML. Might you be able to suggest a
way to prevent this from happening (a switch, attribute, method etc.
that can be used)?

3) We are using a servlet, which makes use of several stylesheets. We
wish to store compiled versions of these files in a cache as
StylesheetRoot objects. We are using a single XSLTProcessor instance to
generate StylesheetRoot objects the first time an xsl file is loaded. My
questions are: 
a) Is the XSLTProcessor object thread-safe? Since the servlet can be
servicing a few requests simultaneously, can the same XSLTProcessor
object be used to create two different StylesheetRoot objects? Does this
need to be synchronized?
b) Does the reset() method need to be called in between each
processStylesheet() method?
c) Is the StylesheetRoot object thread-safe? Again, as a single compiled
xsl file might be required by two simultaneous requests, the same
StylesheetRoot object might be retrieved from the cache. Does this need
to be synchronized?

4) Are there any problems compiling stylesheets from the command line,
that you are aware of?

Thank you for any assistance,
Abby Kehat