Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[wiki] Roundup of Common XHTML Validation Problems/Solutions...
<strong>Attention (21 Nov 05):</strong> This is an old thread I had forgot about sometime ago, stumbled onto again, and had moved to this forum. The original purpose of this thread was to identify trouble areas with validation as it may commonly apply with use of Textile, plugins, or simply in the way TxP handles it’s forms. The idea was to take ideas submitted here and address them in the validation issues page in the wiki. Some of the issues brought up may be out of date at this point, and maybe we can clarify that with good feedback now. I don’t know; is it still worth pursuing? Feedback is needed.
___
(original, and now edited, post starts here)
…as related to TXP and/or Textile.
For those new to TxP and Textile, the handling W3C markup validation errors might be a little confusing.
Consider this a collection call from those more learned about the validation issues/solutions that commonly hang people up, so that we might continue to develop the validation issues page in the wiki.
From my bit of browsing through the boards, it seems the most commone problems have to do with the following:
- ASCII character issues
- Block elements being wrapped in <code><p></code> tags (e.g., <code><p><ol>…</ol></p></code>)
- Development of TxP <strong>Forms</strong>
- Issues with tricky <strong>Textile</strong>
- Et cetera (a slough of issues talked about in thread 8527)
Insights are always appreciated by all.
Last edited by Destry (2005-06-09 14:58:13)
Offline
#2 2005-06-08 15:04:05
- proph3t
- Member
- Registered: 2004-09-26
- Posts: 31
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
Comments problem:<br />
- Comments input should always have a name specified.<br />
- Messagebox should have rows/columns specifiable to validate strict.
<br /><br />
How to fix? Ask zem/dean I guess, or mabe there is a solution..
Last edited by proph3t (2005-06-08 15:05:04)
Offline
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
it’s easier if you specify a specific problem you’re facing and are we talking just contact form?
Anytime I face a problem I read what the validation error says and and make sense of it, and then accordingly fix it. I had a search box that stated I culdn’t add one element to another, it said it was missing x, y z so i added x tag around the search and it was fixed. they could explain it better, but i don’t find it’s too hard, though sometimes a second set of eyes can help
Offline
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
@proph3t: Thanks, good input. So a page with comments enabled will not validate to strict?
@sekhu: I think you misunderstood the point of this topic. Certainly I will learn from my efforts as well, but the motivation here is to consolidate issues for easier future reference for everybody.
Last edited by Destry (2005-06-08 18:12:59)
Offline
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
With regards to this: Block elements being wrapped in <p> tags (e.g., <p><ol>…</ol></p> – You can wrap the p tags in the ol but you can’t wrap the ol around the p tags – I mean that’s how I understand it. Is this written into TXP somewhere? I don’t really know that much, as is self evident but if you wrap a P around a ol or ul it would cause the same error would it not?
I’ve faced a few problems validating things, particularly when it comes to form labels, though I’Ve learnt wrapping a span tag around it seems to work, and using the format correctly
Last edited by sekhu (2005-06-08 15:49:30)
Offline
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
Let’s say you have two paragraphs in an article, and you want to add a “div” box between them, so essentually having three block elements in normal flow. If you add your div element into the article itself with all your text left aligned in the article, then TxP will wrap the div element in paragraph (“p”) tags, which is of course a validation problem. The solution, however, is easy and also documented in Troubleshooting Common XHTML Validation Issues in a Textpattern Site.
Last edited by Destry (2005-06-09 14:14:12)
Offline
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
ah ok i see where you’re going with this now
well i can start off with one, since I have to fix nearly 1000 errors which this has caused: BLOCKQUOTES
this for me is a kicker – in my WP install WP parsed (? too clever for me a word!) the blockquote as, well it did it correctly and the page validated. Having imported all the documents, all 200 entries are causing validation errors simply because TXP requires a space at the start and end of a blockquote. Personally I find this BONKERS and don’t see the point of it – it may make the page look cleaner, but it’s bloody hardwork for those importing who like to write their stuff in a sloppy fashion.
Another would be the use of “center“within text, again if you don’t add the space it will add a p tag around it. It seems to be the king of Ps.
Well just 986 errors to go…
Offline
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
Alright, good feedback, but need a couple clarifications:
sekhu wrote: …TXP requires a space at the start and end of a blockquote.
Do you mean a line space or a blank whitespace (spacebar space)?
Another would be the use of “center” within text, again if you don’t add the space it will add a p tag around it. It seems to be the king of Ps.
Can you be a little more specific, maybe give an example? I don’t quite follow what you mean with the “center” reference.
Last edited by Destry (2005-06-09 14:16:22)
Offline
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
if you use the upm quicktag then it does it for you basically a press of the spacebar before the start blockquote and the start of end blockquote it should then validate.
with the center tag, same thing with the blockquote, if you don’t add a space at the start it won’t validate this might be true with other elemts, best way to find out is to grab a copy of the upm quicktags and see how it adds them, since it does them properly
Offline
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
OK, the blockquote issue is addressed in Troubleshooting Common XHTML Validation Issues in a Textpattern Site, as well as other block element issues.
I still don’t understand the “center” issue, I guess because I don’t understand why you are using a depracated center tag. I would prefer to keep documentation focused on XHTML strict. I think if you use a division (div) correctly (or perhaps even a class attribute) to center a particular string of text, then you don’t have validation problems.
The upm_quicktags plugin was a good mention, particularly because of how it handles stardard XHTML syntax. I’m adding that to the documentation link above as well.
Anyway, everyone, keep the problems coming in, if there are anymore.
Last edited by Destry (2005-06-10 17:34:02)
Offline
#11 2005-06-09 20:22:58
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
I am scratching my head over the following problem.After having ironed out all the above glitches described above my document still would not validate as XHTML Transitional,when I use Firefox Webdevelop plugin’s built in validate local Html function.
It’ll complain about the parsed in Java Script code portions,that you have on any page anyway.
On my local install it will return the following 3 errors:
Line 11, column 29: required attribute "type" not specified
<script language="JavaScript">
The attribute given above is required for an element that you've used,
but you have omitted it. For instance, in most HTML and XHTML document
types the "type" attribute is required on the "script" element and the "alt"
attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
Line 155, column 29: required attribute "type" not specified
<script language="JavaScript">
The attribute given above is required for an element that you've used,
but you have omitted it. For instance, in most HTML and XHTML document
types the "type" attribute is required on the "script" element and the "alt"
attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
Line 155, column 29: document type does not allow element "script" here
<script language="JavaScript">
The element named above was found in a context where it is not allowed.
This could mean that you have incorrectly nested elements -- such as a "style"
element in the "body" section instead of inside "head" -- or two elements that
overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents.
Due to HTML's rules of implicitly closed elements, this error can create cascading
effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in
the "head" section of a HTML document may cause the parser to infer the end
of the "head" section and the beginning of the "body" section (where "link" and
"meta" are not allowed; hence the reported error).
But when I see such a page online like for example zeldman.com it will still validate through the check URL option and not return these errors.
strange……
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#12 2005-06-09 20:33:20
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: [wiki] Roundup of Common XHTML Validation Problems/Solutions...
Somewhat strange, that the same W3C validation service will validate the same thing on it’s URL option,
and not validate on it’s check local option
Even Zeldman doesn’t validate then.
regards
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline