Opened 8 years ago

Closed 7 years ago

#269 closed defect (invalid)

In SAX.Writer xml: prefix not avaliable by default

Reported by: Maxim Reznik Owned by: somebody
Priority: major Milestone: 0.5.0
Component: Matreshka - XML Processor Version: 0.4.0
Keywords: xml writer Cc:

Description

This code caused CONSTRAINT_ERROR with "Message: namespace is not mapped to any prefix"

      --  setting xml:lang attr
      Attrs.Set_Value
       (Namespace_URI => XML_URI,
        Local_Name    => Lang_Attribute,
        Value         => Self.Language);

--      Writer.Start_Prefix_Mapping
--        (Namespace_URI => XML_URI,
--         Prefix        => To_Universal_String ("xml"));

      Writer.Start_Element (Qualified_Name => Message_Element,
                            Attributes     => Attrs);

Vadim says Start_Prefix_Mapping should be optional.

Change History (1)

comment:1 by vadim.godunko, 7 years ago

Milestone: 0.5.0
Resolution: invalid
Status: newclosed

Such error can appear only when writer is misused: Start_Document is not called before call to Start_Element.

Note: See TracTickets for help on using tickets.