On 26 Jan 2006 10:16:47 -0500, Allen S. Rout
<[EMAIL PROTECTED]> wrote:

>
> The developer docs note that
>
> >> One can easily write a program to sift through a set of components
> >> and pull out their <%doc> blocks to form a reference page.
>
> but the tagged extraction problem is, to say the least, nontrivial,
> and I'm reluctant to just suck out the lines between a <%doc> and a
> </%doc>.   Should I not be?  Am I just making this more complicated
> than it needs to be?
>

The tagged extraction problem is non-trivial primarily because of
nested tags.  Mason won't let you nest <%doc> tags anyway, so just
extracting everything between <%doc> and </%doc> is entirely
reasonable.  This is how I do it:

my @doc_sections = ($component =~ m#<%doc>(.*?)</%doc>#g);

--
Jason Kohles
[EMAIL PROTECTED] - http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to