XML-Easy
view release on metacpan or search on metacpan
lib/XML/Easy/Syntax.pm view on Meta::CPAN
our $VERSION = "0.011";
use parent "Exporter";
our @EXPORT_OK = qw(
$xml10_char_rx $xml10_s_rx $xml10_eq_rx
$xml10_namestartchar_rx $xml10_namechar_rx
$xml10_name_rx $xml10_names_rx $xml10_nmtoken_rx $xml10_nmtokens_rx
$xml10_charref_rx $xml10_entityref_rx $xml10_reference_rx
$xml10_chardata_rx
$xml10_cdata_rx $xml10_cdstart_rx $xml10_cdend_rx $xml10_cdsect_rx
$xml10_attvalue_rx $xml10_attribute_rx
$xml10_stag_rx $xml10_etag_rx $xml10_emptyelemtag_rx
$xml10_comment_rx $xml10_pitarget_rx $xml10_pi_rx
$xml10_content_rx $xml10_element_rx
$xml10_versionnum_rx $xml10_versioninfo_rx
$xml10_encname_rx $xml10_encodingdecl_rx
$xml10_sddecl_rx $xml10_xmldecl_rx $xml10_textdecl_rx
$xml10_misc_rx $xml10_miscseq_rx
$xml10_prolog_xdtd_rx $xml10_document_xdtd_rx $xml10_extparsedent_rx
);
lib/XML/Easy/Syntax.pm view on Meta::CPAN
while the characters of that sequence are acceptable individually.
The XML grammar does not allow two instances of this production to abut.
=cut
our $xml10_chardata_rx = qr/(?:
\]?(?![<&\]])$xml10_char_rx
|\]{2,}(?![<&\>\]])$xml10_char_rx
)*\]*/xo;
=item $xml10_cdata_rx
Literal character data in a CDATA section. This consists of zero or
more acceptable characters, not including "B<< ]]> >>" as a subsequence.
Unlike ordinary literal character data, the characters "B<< < >>" and
"B<&>" are not metacharacters here. Such data stands for itself when
it appears within a CDATA section.
As with ordinary literal character data (see above), this data is meant
to be taken literally only after line endings have been canonicalised.
Also, as with ordinary literal character data, two instances of this
production should not abut.
=cut
our $xml10_cdata_rx = qr/(?:
\]?(?!\])$xml10_char_rx
|\]{2,}(?![\>\]])$xml10_char_rx
)*\]*/xo;
=item $xml10_cdstart_rx
=item $xml10_cdend_rx
The fixed strings "B<< <![CDATA[ >>" and "B<< ]]> >>" which begin and
finish a CDATA section.
lib/XML/Easy/Syntax.pm view on Meta::CPAN
our $xml10_cdstart_rx = qr/<!\[CDATA\[/;
our $xml10_cdend_rx = qr/\]\]>/;
=item $xml10_cdsect_rx
A CDATA section. This consists of "B<< <![CDATA[ >>", literal character
data with metacharacters disabled, and "B<< ]]> >>".
=cut
# Note: using the $xml10_cdata_rx regexp (from above) here would be much
# less efficient than this use of (?>...). It would also run into the
# perl bug described in L</BUGS>.
our $xml10_cdsect_rx = qr/(?><!\[CDATA\[$xml10_char_rx*?\]\]>)/o;
=back
=head2 Tags
=over
( run in 0.671 second using v1.01-cache-2.11-cpan-454fe037f31 )