#33 In SAXResult namespaces arent attributes

v6.4.4
closed
3
2012-10-08
2001-10-19
Michael Kay
No

When Saxon output is sent to a ContentHandler
(typically supplied as a SAXResult, or when using a
SAXTransformerHandler), namespace declarations in the
result document are reported to the ContentHandler
using the startPrefixMapping() call, but they aren't
included in the Attributes collection passed to the
startElement() call. They should be.

Present in 6.4.4 and all previous releases.

Discussion

  • Michael Kay

    Michael Kay - 2001-11-12

    Logged In: YES
    user_id=251681

    Source code fixed, not yet tested. - MHK

     
  • Michael Kay

    Michael Kay - 2001-11-15

    Logged In: YES
    user_id=251681

    This isn't a bug. The SAX2 spec for ContentHandler says
    that it only receives namespace declarations as attributes
    if it sets a specific feature in the parser; the default is
    that namespace declarations aren't supplied in the
    attribute list. In this case the ContentHandler isn't being
    called by a parser, so there is no way of setting this
    option. It's reasonably, howwver, for Saxon to pass the
    events that a parser would generate by default.

    (Actually, I tried changing this, and too many other things
    broke).

    MHK