Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

tye gave the technical reasons why that /doesn't/ work, and did a good job, but he rather skimmed over the logical reasons why it /shouldn't/ work.

Logicaly, readmore isn't an empty tag that has an effect at a single place in your XHTML. Instead, it's a block-level (?) tag, which has an opening and a closing, and hides it's interior unless you're looking directly at the node (IE it's the root node of the page you're looking at). For convience, we allow you to ommit the close tag, in which case it's taken to be at the end of your node.

The empty-tag form in XML (that is <tag />) is defined to be a shortcut for opening, and then immedatly closing again (<tag></tag>). Thus, it logicaly should hide nothing, that is, do nothing.

(Of course, this doesn't explain why things /are/ they way they are, it mearly explains why they should be the way they are. tye's explanition is, as usual, correct, I just wanted to give another viewpoint, and explain why this isn't mearly a WONTFIX bug, but not really a bug at all.)


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).


In reply to Re: XML-style readmore not being parsed by theorbtwo
in thread XML-style readmore not being parsed by premchai21

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others musing on the Monastery: (4)
    As of 2025-06-22 03:03 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?
      erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.