Ok: I figured it out; it is in fact a problem with namespace-awareness 
settings. Default setting for SAX parsers constructed via JAXP SAXParserFactory 
is (I think) non-namespace-aware. If I explicitly set namespace-awareness on 
factory, things work ok.
I don't know if there is a bug in some part of ns-awareness detection between 
Xalan and Xerces (or maybe a "feature"? :) ), but explicitly setting it avoids 
these problems.

-+ Tatu +-

ps. apologies if this is a FAQ entry; I tried searching FAQ but didn't see a 
mention

--- On Fri, 2/6/09, Tatu Saloranta <cowtownco...@yahoo.com> wrote:

> From: Tatu Saloranta <cowtownco...@yahoo.com>
> Subject: Problem: xalan dropping element names with transformations?
> To: xalan-j-users@xml.apache.org
> Date: Friday, February 6, 2009, 6:05 PM
> This sounds like something I am doing wrong, but I
> couldn't quite figure it out. Basically, I am running
> very simple test xsl transformations with Xalan & Xerces
> (including what amounts to identity transformation, i.e.
> just copies input nodes as is), but the output is missing
> element names.
> This seems to happen when explicity passing XMLReader
> constructed from xerces via SAXParserFactory; but if I use
> another SAX parser (non-xerces), result does contain
> (prefixed) element names as expected.
> 
> My first guess was that perhaps this had something to do
> with versions of xercesImpl and serializer; but downgrading
> (from Xerces 2.9.1 and matching serializer) didn't
> resolve the problem.
> 
> Or could it be some mixup between SAX parser settings; I
> remember that whethere prefixed-names are reported depends
> on some of settings.
> Hmmh. Maybe I need to play with namespace-awareness
> settings.
> 
> -+ Tatu +-


      

Reply via email to