> I would like to have the elements in the DOM have their attributes set
with
> default values (those that where not set in the xsl).

Best suggestion I can give you for now is to have Xalan output SAX, and
route that into a homebrew SAX-to-DOM builder which uses the DTD or schema
information to load the appropriate DocumentType information and set those
defaults. Or, perhaps safer and more portable: Rewrite your stylesheet to
explicitly set those attributes rather than counting on the defaults.

Xalan's built-in DOM output is actually a thin DOM proxy layer wrapped
around our internal data model, which is *NOT* aware of DTDs and schemas at
this time and definitely doesn't generate default attributes. That will
probably change as we move toward XPath 2.0 and XSLT 2.0, which are
schema-aware. We had a partial prototype of that code on a side branch of
the Apache CVS server, and we'll be improving on that and folding it into
the main Xalan development branch as we move forward.



______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

Reply via email to