#7 Making PSGML suitable for XHTML editing

open
nobody
None
5
2004-04-30
2004-04-30
J. J. Ramsey
No

The attached patch applies against psgml 1.3.1 and adds
the following features:

* If sgml-xml-space-before-empty-tag-slash is non-nil,
a space will be inserted before the `/>' of empty XML
tags. The W3C recommends adding the space before the
"/>" of empty XHTML tags so that non-XHTML-aware
browsers will still render the XHTML correctly. (See
<http://www.w3.org/TR/xhtml1/#C_2>.)

* Strictly conforming XHTML documents must have the
xmlns attribute of the "html" set, and it must have the
value http://www.w3.org/1999/xhtml. (See
<http://www.w3.org/TR/xhtml1/#strict>.) In the XHTML
DTD, however, the xmlns attribute is #FIXED. To
accomodate this, fixed attributes can now be inserted
with sgml-insert-attribute. Since a #FIXED attribute
can only have one value, sgml-insert-attribute (or more
accurately, sgml-read-attribute-value) does not prompt
for the value of the attribute but enters the correct
one automatically. Also, sgml-default-asl automatically
inserts the xmlns attribute and attributes beginning
with "xmlns:" (note the colon) the way it does
#REQUIRED attributes.

* In the Customize buffer, Emacs 21 tries to treat
"sgml-set-face" like a face variable. Originally, I
fixed this by changing sgml-set-face to sgml-set-faces,
but undid this, and used defcustom instead of defvar
for PSGML's user options, so that the Customize buffer
could handle them more intelligently. Now sgml-set-face
is treated like a yes/no value as it should, and the
UIs for editing user options like sgml-markup-faces are
somewhat nicer as well.

Discussion

  • J. J. Ramsey
    J. J. Ramsey
    2004-05-08

    Patch w/ fixes for XHTML suitability (updated)

     
    Attachments