Opened 11 years ago

Closed 10 years ago

Last modified 8 years ago

#1247 closed bug (fixed)

Text.XHtml version is out of date?

Reported by: paulrbrown@… Owned by:
Priority: normal Milestone:
Component: libraries (other) Version: 6.6
Keywords: Text.XHtml Cc:
Operating System: Unknown/Multiple Architecture: powerpc64
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I tried some first experiments with the Text.XHtml library, and I found that it doesn't actually produce XHTML? Among potentially other things, the xmlns=.... attribute is not added to the html document element.

I've reviewed the source that I build GHC 6.6 from, and I can see the omission plainly. Nonetheless, ifif I look closely at the online sources in darcs, I can see that it would behave correctly. (The "good" version of Internals.hs in Text/XHtml has a mkHtml function.)

Resolution would be simply to distribute the correct version of the library.

Change History (6)

comment:1 Changed 11 years ago by paulrbrown@…

OK - this is definitely a bug.

From darcs:

The InternalRender module was added to avoid circular dependencies between the Internals module and the Strict.Elements module. I moved the functions back

into Internals by using the tag and strAttr primitives instead of the Strict.Elements function thehtml.

Users normally won't use thehtml, instead it will be added by using one of the rendering functions. Thus it seems likely that any user who actually uses thehtml wants to do something special, and we shouldn't force the xmlns attribute on them.

It seems quite unlikely that most users would use the xmlns attribute, so I removed it to avoid changing the public API.

Without the xmlns attribute, the library isn't much good, as it won't produce valid output as per the spec:

The root element of the document must contain an xmlns declaration for the XHTML namespace [XMLNS]. The namespace for XHTML is defined to be

comment:2 Changed 11 years ago by paulrbrown@…

This appears to be fixed on the trunk.

comment:3 Changed 11 years ago by bringert

Operating System: MacOS XMultiple

The fixed version has been released as 3000.0.1, and is available from Hackage:

comment:4 Changed 10 years ago by igloo

Component: libraries/baselibraries (other)
Resolution: fixed
Status: newclosed

6.6.1 extralibs will include a working version.

comment:5 Changed 9 years ago by simonmar

Operating System: MultipleUnknown/Multiple

comment:6 Changed 8 years ago by simonmar

difficulty: Easy (1 hr)Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.