Updated version available. Thank you.
I'm back from a week full of Movable Type. I can dream the element names, my login and .htaccess. Now on-topic:
Every comment you make should be well-formed, if not, the entry-page will crash. So don't fool around ;). I will edit the comments from time to time to make sure they are valid against the DTD and the specification.
The following elements are allowed:
abbr
and acronym
, with the optional title
and xml:lang
attributes.
p
and br
, with the optional xml:lang
attribute for the p
element.
a
, with the following attributes: href
, xml:lang
, hreflang
, title
, rel
.
em
, strong
, sup
and sub
.
ul
and ol
with the 'sub' element li
.
blockquote
and q
with the following attributes: cite
and xml:lang
.
samp
and code
. The code
element can contain a class
attribute and a 'sub' element var
.
I would like you to follow the following formatting rules. When you specify an external link, use rel="external"
as an attribute. That isn't too difficult is it? Element names should be marked up with samp
and tags should be marked up with code
.
When you want to specify a block of code. Make sure everything is escaped properly. All you have to do is to wrap it inside a code
element, which is inside a (standalone) p
element. You give the code
element a class
. The value of the class
is the language you are using. There is absolutely no need to use br
or p
within a block of code. This is done with CSS.
If you have any questions, feel free to comment following the above standing rules. Thank you.
Hmm, interesting.
You expect everyone to do this without a problem? To post it without a preview? You have good confidence in us, thanks :)
Well, if it cracks we can always get IE from the trashcan and use that.
BTW, the radioboxes for remember and forget are a bit unaligned (that's a nice word!).
I see now that I forgot to add some <p>
tags in my previous post...
Sorry..
Readers are expected to post perfectly well-formed XML from a tiny little text-entry field without so much as a preview?
Good luck!
And people complain that my comment system puts an undue burden on the poster!
hmmmm, I think I'll just post plain text :)))
Can you explain on your approach how to distinct samp
from code
.
<-- so I think I already did it wrong ;) Those things are not displayed, 'cause I did some things against 'crazy' people like you ;). I converted it into an entity so everyone can see what you were trying to do.
Next time I edit someone's entry I will make it more clearer in a visable way. Not just by using the ins
element, which is not displayed, 'cause I don't allow it in comments. It's always good to discover bugs.
samp
is used for element names, like samp
. code
is used for tags, like <code>
. Is that clear enough? Also one example for 'block code':
html{ background:purple; /* view (selection) source for the markup */ }
okay....let's do it like that <-- You weren't clear about entities ;)
What I meant about samp
and <code>
. I never used the samp
element and didn't find a....hmmm...semantically clear explanation in the SPECs
Hopefully, this comment gets through :))
I think it would be better to use a Wiki syntax to post comment, associated with a bit of PHP code to transform wiki to valid XHTML.
A french programmer, Olivier Meunier - owner of Neokraft.net - has designed a PHP class named Wiki2xhtml to do this job, and you can see a demo at this page. Notice the capability of enabling/disabling options, so that you can decide what Wiki elements have to be transformed in XHTML.
I'm sure it could help you, avoiding you editing user comments if they are not valid. Unfortunately the resource is in French.
Sorry for my English (I'm French).
Anne, it's good to see you're back again, I mist reading this blog. That said, I'd like to point out that Simon Willison has found a very nice bookmarklet for XML Textarea Validation. It's JavaScript, but might be nice as a service to your visitors.
Oh, and please increase the size of the comment box...
You may what to use the phrase, well-formed XML fragment, since well-formed XML must have only one root element (unlike the comments).