Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: RFC: New rootlevel CPAN namespace: XHTML

by kal (Hermit)
on May 09, 2003 at 17:06 UTC ( [id://256934]=note: print w/replies, xml ) Need Help??


in reply to RFC: New rootlevel CPAN namespace: XHTML

Personally, I would say yes, new namespace. Because I think an XHTML module should be a radical departure from HTML, not in terms of it's output, but in terms of it's construction.

An XHTML module should - by default - be built using the existing XML tools, and shouldn't be outputting 'XML-like code' but actual machine-generated bona-fide XML.

From the otherside, outputting XHTML and using it in a HTML context is almost as bad as outputting non-XML in an XHTML context. <br />, for example, is invalid markup in HTML4.0 (strictly speaking). Of course, browsers will ignore the '/' but you're giving up clean HTML and getting tag soup. Some browsers, especially Moz, might even start going into almost-standards most/quirks mode, or something, which is even worse.

Strictly speaking, I don't think one is a subset of the other, but I would love to see how you propose to do XHTML modules. By thinking about implementation, I'm probably thinking on very different lines to you (or am I?).

Replies are listed 'Best First'.
(jeffa) 2Re: RFC: New rootlevel CPAN namespace: XHTML
by jeffa (Bishop) on May 09, 2003 at 17:43 UTC
    I agree that my module should use existing XML tools, but right now the only dependency is DBI ... i guess i really am outputting 'XML-like' markup that happens to be valid (right now ...)

    If i do get to take over HTML::Table, i will most likely add the option to choose HTML or XHTML. But i do see a problem in generating 'bona-fide' XML because the output of my module is simply a piece of an entire XML document. Correct me if i am wrong, but most XML tools that i have worked with insist on some sort of 'header' ... and this module does not need to do that - that responsibility belongs to the 'container' document which will hold the resulting table.

    Thanks for your input. :)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    

      You're right about the fragmentation issue - that is something that conceivably stop someone outputting valid X/HTML. But that would be the kind of implementation issue that a XHTML:: module should support - chaining of object serialization, for example, could solve the problem in a nice way.

      My hope for anytbing XHTML:: would not be that it would output mostly XHTML, but that it would guarantee to output valid XML at least. That would be the selling point for me. Unfortunately, XML is a little unwieldy in Perl in some respects (thinking mostly about accessibility of modules on common systems), but what the hey.

      I don't think many people get the benefits of XHTML yet. For example, I had validated my site as XHTML for quite a while before delivering the content with the correct MIME type. Mozilla had a big surprise in wait for me when I did that - it doesn't render non-XML pages. That is why an XHTML:: module must guarantee XML output - you can't actually do 'correct' XHTML without it (or, you can try, but Mozilla won't display anything other than an error message).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://256934]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-29 00:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found