Petr Pajas > XML-XSH2-2.1.6 > XSH

Download:
XML-XSH2-2.1.6.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

XSH - scripting language for XPath-based editing of XML

PREAMB

foreach my $sec ($dom->findnodes('/recdescent-xml/doc/section')) { my $name=$sec->getAttribute('id');

  ($title)=$sec->findnodes('./title');
  my $t= $title ? get_text($title,0,2) : $name;
  pprint "\n=head1 ",uc($t),"\n\n";
  print_description($sec,"","");

  my @commands=$dom->findnodes("//rules/rule[\@type='command' and ".
                               "documentation[contains(\@sections,'$name')]]");
  if (@commands) {
    pprint "\n\n=head2 RELATED COMMANDS\n\n";
    pprint join ", ", sort map { get_name($_) }
               @commands;
    pprint "\n\n";
  }

}

#pprint "\n=head1 COMMAND REFERENCE\n\n=over 5\n\n"; #foreach ($dom->findnodes("//rules/rule[\@type='command' and documentation]")) { # pprint "\n\n=item ".get_name($_)."\n\n"; # pprint get_text($_->findnodes('documentation/shortdesc')); #} #pprint "\n=back\n\n";

#pprint "\n=head1 ARGUMENT TYPES\n\n"; #pprint wrap(" "," ", # join ", ", sort map { get_name($_) } # grep {defined($_)} # $dom->findnodes("//rules/rule[\@type='argtype']")), # "\n\n";

pprint "\n=head1 COMMAND REFERENCE\n\n";

foreach my $r (sort {get_name($a) cmp get_name($b)} $rules->findnodes('./rule[@type="command"]')) { print_rule_desc($r); }

pprint "\n=head1 ARGUMENT TYPE REFERENCE\n\n"; pprint "=over 4\n\n";

foreach my $r (sort {get_name($a) cmp get_name($b)} $rules->findnodes('./rule[@type="argtype"]')) { ($desc)=$r->findnodes('./documentation/description'); if ($desc) { pprint "\n\n=item ".get_name($r)."\n\n"; print_description($desc,'',''); } } pprint "\n\n=back\n\n";

pprint "\n=head1 XPATH EXTENSION FUNCTION REFERENCE\n\n"; foreach my $r (sort {get_name($a) cmp get_name($b)} $rules->findnodes('./rule[@type="function"]')) { print_rule_desc($r); }

pprint "\n";

pprint <<'POSTAMB';

AUTHOR ^

Petr Pajas, pajas@matfyz.cz

SEE ALSO ^

xsh, XML::XSH2, XML::XSH2::Compile, XML::LibXML, XML::XUpdate, http://xsh.sourceforge.net/doc

syntax highlighting: