[Mono-bugs] [Bug 433559] New: XslCompiledTransform does not preserve empty elements

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 8 12:16:58 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=433559


           Summary: XslCompiledTransform does not preserve empty elements
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: james.bird at realtimeworlds.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=244376)
 --> (https://bugzilla.novell.com/attachment.cgi?id=244376)
A small program that reproduces the bug

When using the Microsoft runtime, if your input XML contains empty elements
(i.e. <Element/>), it will output these elements as <Element/>.

When using the Mono runtime, if your input XML contains empty elements, it will
output them as <Element></Element>.

This causes problems when you later use an XmlReader to read your transformed
XML, and use the XmlReader.IsEmptyElement property (i.e. different behaviour on
Mono vs Microsoft implementations).

I have attached a small program that reproduces this bug.

When running under Microsoft's runtime, the following output is observed:

Before Transform: <Foo><Bar/></Foo>
After Transform: <Foo><Bar /></Foo>
'Bar' is an empty element

But when running under Mono's runtime, the following output is observed:

Before Transform: <Foo><Bar/></Foo>
After Transform: <Foo><Bar></Bar></Foo>
ERROR: No Empty Elements Found!


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list