XML Parrot Was: XML::Rules tagspec
by Maurice Mengel other posts by this author
Aug 15 2009 3:45AM messages near this date
view in the new Beta List Site
Re: XML read/write using schemas - Consultancy?
|
Re: XML Parrot Was: XML::Rules tagspec
& XSLT Hi,
not really related to your posts, but also not completely unrelated:
I looked up XML::Rules on CPAN and followed the links in the
documentation. On this way I got to the idea of treating XML as lisp
on perlmonks.org. Now, I wonder if one should write a grammar for XML
in parrot. What would this mean? Would this be similar to the lisp
idea? Would this be helpful? Would this serve as a parser? Any ideas
on this?
thanks
Maurice
On Sat, Aug 15, 2009 at 6:10 AM, Terrence Brannon<schemelab@[...].com> wrote:
> Jenda Krynicky wrote:
> > use XML::Rules;
> >
>
>
> 1 - perhaps you could use a few more head sections to break up the docs
> under 'The Rules'. =head3 tag spec = head3 action
>
> and then several =head4 for each action so they can be seen from the TOC.
>
> 2 - Â but anyway I'm wondering why you cant select tags based on
> attributes of the tag. And also why you cant provide a subref here that
> returns true for tags matching its tests. In others,
> HTML::Element::look_down can find tags by 'tagspec', but it can also
> easily do various attribute tests and if that's not enough, use a sub ref.
>
> The reason I mention it, is that you could have two table tags in a
> document and have different rules for processing each:
>
> sub my_table_1 {
> Â Â $self->gi eq 'table' and $self->attr('table_number') == 1
> }
>
> Â my $tagspec = \&my_table_1
>
>
>
> _______________________________________________
> Perl-XML mailing list
> Perl-XML@[...].com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Maurice Mengel
Jenda Krynicky
Terrence Brannon
|