view release on metacpan or search on metacpan
share/tred_extension/treex/resources/treex_schema.xml view on Meta::CPAN
<!-- Metainfo (info about the whole document) -->
<type name="meta.type">
<structure>
<member name="description"><cdata format="any"/></member>
<member name="zones">
<sequence>
<element name="zone" type="language_parametrized_doc_zone.type"/>
</sequence>
</member>
<member name="wild_dump"><cdata format="any"/></member>
</structure>
</type>
<type name="language_parametrized_doc_zone.type" >
<structure>
<member name="language" required="1" as_attribute="1" type="langcode.type"/>
<member name="selector" as_attribute="1"><cdata format="any"/></member>
<member name="text"><cdata format="any"/></member>
</structure>
</type>
<type name="bundle.type" >
<structure role="#NODE" name="bundle-root">
<member as_attribute="1" name="id" role="#ID" required="1"><cdata format="ID"/></member>
<!--CzEng meta informations (not stable, may be changed/deleted in future)
align_score is a alignment quality score which may be used in filters.
CzEng ids are very long, so we don't want to store them in bundle id,
because id of each node is derived from the id of its bundle (and zone and tree)
and we don't want to have so many long ids.
-->
<member name="czeng">
<structure>
<member name="section"><cdata format="any"/></member>
<member name="blockid"><cdata format="any"/></member>
<member name="domain"><cdata format="any"/></member>
<member name="id"><cdata format="any"/></member>
<member name="missing_sents_before"><cdata format="any"/></member>
<member name="filter_score"><cdata format="any"/></member>
<member name="filter_features"><cdata format="any"/></member>
<member name="align_score"><cdata format="any"/></member>
<member name="origfile"><cdata format="any"/></member>
</structure>
</member>
<member name="zones">
<sequence>
share/tred_extension/treex/resources/treex_schema.xml view on Meta::CPAN
</sequence>
</member>
<member name="message_board">
<list ordered="1">
<cdata format="any"/>
</list>
</member>
<!-- ptacek: -->
<member name="dialog">
<structure>
<member name="from"><cdata format="any"/></member>
<member name="to"><cdata format="any"/></member>
<member name="body_asr_confidence"><cdata format="any"/></member>
<member name="body_gesture"><cdata format="any"/></member>
<member name="body_emotion"><cdata format="any"/></member>
<member name="dialog_act"><cdata format="any"/></member>
<member name="sentence_type"><cdata format="any"/></member>
<member name="utterance_datetime"><cdata format="any"/></member>
<member name="local_timezone"><cdata format="any"/></member>
</structure>
</member>
<member name="wild_dump"><cdata format="any"/></member>
</structure>
</type>
share/tred_extension/treex/resources/treex_schema.xml view on Meta::CPAN
containing trees and attributes -->
<type name="zone.type" >
<structure>
<member name="language" required="1" as_attribute="1" type="langcode.type"/>
<member name="selector" as_attribute="1"><cdata format="any"/></member>
<member name="sentence"><cdata format="any"/></member>
<member name="trees">
<structure>
<member name="a_tree" type="a-root.type"/> <!-- pozor, bude potreba zmenit a-root.type!!! -->
<member name="t_tree" type="t-root.type"/>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Treex/PML/Backend/CSTS/Csts2fs.pm view on Meta::CPAN
my ($s,$data)=@_;
$s->{node}->{X_hide}='' if ($data eq 'TNT');
}]
);
my %pcdata = (
'source' => [\&to_node_attr,'','cstssource'],
'mauth' => [sub {
my ($s)=@_;
if (($s->{elements}->[-3]||'') eq 'h') {
to_attr(@_,'following_root','','cstsmarkup');
lib/Treex/PML/Backend/CSTS/Csts2fs.pm view on Meta::CPAN
}
pop @elements;
pop @attributes;
} elsif ($type eq '-') { # character data
my $element = $elements[-1];
if (exists($pcdata{$element})) {
my ($cb,@args)=@{ $pcdata{$element} };
&$cb($state,unescape_data($data),@args);
}
} elsif ($type eq 'A') { # attribute of the next element
my ($name,$value)= $data=~m{^(\S+) (?:IMPLIED$|(?:CDATA|NOTATION|ENTITY|TOKEN|ID) (.*))};
push @$next_attributes,[$name,unescape_data($value)];
view all matches for this distribution
view release on metacpan or search on metacpan
share/static/index.js.map view on Meta::CPAN
{"version":3,"sources":["webpack:///index.js","webpack:///webpack/bootstrap 5eb2d13f2f5004dfb730","webpack:///./~/css-loader/lib/css-base.js","webpack:///./~/style-loader/addStyles.js","webpack:///./~/d3/d3.js","webpack:///./~/jquery/dist/jquery.js",...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tripletail/Mail.pm view on Meta::CPAN
while( $part =~ /($re_char{1,7})/og )
{
my $part2 = $1;
$part2 = Unicode::Japanese->new($part2)->h2zKana->jis;
my $encdata=encode_mimeword($part2, 'B', $charcode);
if( $result ne '' )
{
$result .= "\n ";
}
$result .= $encdata;
$length = length($encdata);
}
$prev_is_enc = 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Typist/Util/String.pm view on Meta::CPAN
my %Map_Decode = reverse %Map;
my $RE = join '|', keys %Map;
my $RE_D = join '|', keys %Map_Decode;
sub encode_xml {
my ($str, $nocdata) = @_;
return '' unless defined $str;
if (
!$nocdata
&& $str =~ m/
<[^>]+> ## HTML markup
| ## or
&(?:(?!(\#([0-9]+)|\#x([0-9a-fA-F]+))).*?);
## something that looks like an HTML entity.
view all matches for this distribution
view release on metacpan or search on metacpan
tx/wsdls.txt view on Meta::CPAN
http://www.soapengine.com/lucin/salcentral/cvisitor.asmx?wsdl
http://www.codebump.com/services/placelookup.asmx?wsdl
http://www.soapengine.com/lucin/salcentral/csearch.asmx?wsdl
http://www.nickhodge.com/nhodge/finnwords/finnwords.wsdl
http://www.soapengine.com/lucin/salcentral/chotlist.asmx?wsdl
http://www.soapengine.com/lucin/salcentral/cdatadict.asmx?wsdl
http://ws2.serviceobjects.net/gp/GeoPhone.asmx?WSDL
http://majordojo.com/amazon_query/amazon_query.wsdl
http://www.stgregorioschurchdc.org/wsdl/Bible.wsdl
http://www.stgregorioschurchdc.org/wsdl/Calendar.wsdl
http://www.soapengine.com/lucin/salcentral/cweather.asmx?wsdl
view all matches for this distribution
view release on metacpan or search on metacpan
t/11-Schema.t view on Meta::CPAN
$data->{test} = 1;
is_deeply($data, {test => 1}, '$data');
is_deeply($obj->{data}, {test => 1}, '$obj->{data}');
is_deeply($obj->clone_data, {test => 1}, '$obj->clone_data');
my $cdata = $obj->clone_data;
$cdata->{test2} = 2;
is_deeply($cdata, {test => 1, test2 => 2}, '$cdata');
is_deeply($obj->{data}, {test => 1}, '$obj->{data}');
is_deeply($obj->clone_data, {test => 1}, '$obj->clone_data');
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/500-domops_find.t view on Meta::CPAN
# and that array must have a size of as many html elements were returned
# and each item of the array must contain keys 'result' and 'name' (which is the func name declared)
is(scalar(@{$ret->{'cb-results'}->{$acbname}}), scalar(@{$TV}), 'domops_find()'." : test '${tk}' : called with a '${acbname}' callback and returned value contains key 'cb-results'->$acbname and it is an ARRAY which has exactly as many items as ther...
for(my $i=scalar(@{$ret->{'cb-results'}->{$acbname}});$i-->0;){
my $ares1 = $ret->{'cb-results'}->{$acbname}->[$i];
my $funcdata = $TV->[$i];
if( $acbname eq 'find-cb-on-matched' ){
is(scalar(@$ares1), scalar(@{$found->{'first-level'}}), 'domops_find()'." : test '${tk}' : called with a '${acbname}' callback and returned value contains key 'cb-results'->$acbname and it is an ARRAY which has exactly as many items as the HTML e...
} else {
is(scalar(@$ares1), scalar(@{$found->{'all-levels'}}), 'domops_find()'." : test '${tk}' : called with a '${acbname}' callback and returned value contains key 'cb-results'->$acbname and it is an ARRAY which has exactly as many items as the HTML el...
}
for my $ares2 (@$ares1){
is($ares2->{'name'}, $funcdata->{'name'}, 'domops_find()'." : test '${tk}' : called with a '${acbname}' callback and verified function name it is as it was declared '".$funcdata->{'name'}."'.") or BAIL_OUT(perl2dump($ret)."test '${tk}' (executed ...
is($ares2->{'result'}, 1, 'domops_find()'." : test '${tk}' : called with a '${acbname}' callback and returned result is '1'.") or BAIL_OUT(perl2dump($ret)."test '${tk}' (executed JS in '$js_outfile_tmp') : failed, above is what it was returned fr...
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
sample/jquery.js view on Meta::CPAN
},
// Contents
"empty": function( elem ) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
// not comment, processing instructions, or others
// Thanks to Diego Perini for the nodeName shortcut
// Greater than "@" means alpha characters (specifically not starting with "#" or "?")
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Scraper/ISBN/BookDepository_Driver.pm view on Meta::CPAN
###########################################################################
# Constants
use constant REFERER => 'http://www.bookdepository.co.uk/';
use constant SEARCH => 'http://www.bookdepository.co.uk/search?search=search&searchTerm=';
my ($URL1,$URL2) = ('http://www.bookdepository.co.uk/book/','/[^?]+\?b=\-3\&t=\-26\#Bibliographicdata\-26');
#--------------------------------------------------------------------------
###########################################################################
# Public Interface
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Scraper/ISBN/PickABook_Driver.pm view on Meta::CPAN
###########################################################################
# Constants
use constant REFERER => 'http://www.pickabook.co.uk/';
use constant SEARCH => 'http://www.pickabook.co.uk/%s.aspx?ToSearch=TRUE';
my ($URL1,$URL2) = ('http://www.PickABook.co.uk/book/','/[^?]+\?b=\-3\&t=\-26\#Bibliographicdata\-26');
#--------------------------------------------------------------------------
###########################################################################
# Public Interface
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Scraper/ISBN/Waterstones_Driver.pm view on Meta::CPAN
###########################################################################
# Constants
use constant REFERER => 'https://www.waterstones.com';
use constant SEARCH => 'https://www.waterstones.com/index/search?term=';
my ($URL1,$URL2) = ('http://www.waterstones.com/book/','/[^?]+\?b=\-3\&t=\-26\#Bibliographicdata\-26');
#--------------------------------------------------------------------------
###########################################################################
# Public Interface
view all matches for this distribution
view release on metacpan or search on metacpan
website/selenium/html-xpath/html-xpath-patched.js view on Meta::CPAN
// query on these nodes, but they're broken anyway.
if (node.nodeName.indexOf("/") > -1
|| node.nodeName == ""
|| node.nodeName == "#document"
|| node.nodeName == "#document-fragment"
|| node.nodeName == "#cdata-section"
|| node.nodeName == "#xml-declaration"
|| node.nodeName == "#whitespace"
|| node.nodeName == "#significat-whitespace"
)
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Splunk/XMLParser.pm view on Meta::CPAN
} elsif ($node->nodeName () eq 'entry') {
# Crippled Atom envelope
foreach my $node ($node->childNodes ()) {
return parsetree ($node) if $node->nodeName () eq 'content';
}
} elsif ($node->nodeType eq XML_TEXT_NODE or $node->nodeName () eq '#cdata-section') {
return $node->textContent;
# Results
} elsif ($node->nodeName () eq 'results') {
return map { { parsetree ($_) } }
view all matches for this distribution
view release on metacpan or search on metacpan
share/files/public/skins/default/jquery-ui-1.9.1.custom/development-bundle/jquery-1.8.2.js view on Meta::CPAN
return !Expr.pseudos["empty"]( elem );
},
"empty": function( elem ) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
// not comment, processing instructions, or others
// Thanks to Diego Perini for the nodeName shortcut
// Greater than "@" means alpha characters (specifically not starting with "#" or "?")
var nodeType;
elem = elem.firstChild;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Web/XDO.pm view on Meta::CPAN
# println $class, '->new()'; ##i
# create page object
$page = $class->SUPER::new();
# don't recognize cdata tags
$page->xml_mode(1);
# must either designate a caller or explicitly set as top page
if (my $caller = $opts{'caller'}) {
if (UNIVERSAL::isa($caller, 'Web::XDO::Page')) {
lib/Web/XDO.pm view on Meta::CPAN
# TESTING
# println $tag_name, '->start'; ##i
# normalize tag name
# NOTE: We need to normalize here because the parser is in xml_mode. That
# mode is on so that content of cdata tags (specificall <title>) are
# parsed. It has the side-effect that tag names are sent as they appear
# in the document being parsed. If anybody knows a more global way to send
# lowercased tag names I'll be glad to hear about it. - Miko
$tag_name = lc($tag_name);
lib/Web/XDO.pm view on Meta::CPAN
my ($page, $tag_name, $raw) = @_;
my ($token);
# normalize tag name
# NOTE: We need to normalize here because the parser is in xml_mode. That
# mode is on so that content of cdata tags (specificall <title>) are
# parsed. It has the side-effect that tag names are sent as they appear
# in the document being parsed. If anybody knows a more global way to send
# lowercased tag names I'll be glad to hear about it. - Miko
$tag_name = lc($tag_name);
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/user_items view on Meta::CPAN
[{"id":8631,"uuid":"dd4fce78b1bc32b64600","user":{"name":"Yuuki Tsubouchi","url_name":"y_uuki_","profile_image_url":"https://si0.twimg.com/profile_images/2300728190/Apple-hearing-moved-to-next-year_normal.jpg"},"title":"\u30d1\u30d5\u30a9\u30fc\u30de...
view all matches for this distribution
view release on metacpan or search on metacpan
WebSource/Parser.pm view on Meta::CPAN
}
}
$self->SUPER::start($tag,\%nattr,\@naseq,$origtext);
}
sub text {
my ($self,$origtext,$iscdata) = @_;
if(!$iscdata) {
$origtext =~ /Sion/ and print "Text : $origtext\n";
if($origtext =~ m/\0/) {
$self->{verbose} and warn "Decected null char\n";
$origtext =~ s/\0//g;
}
if($origtext =~ m/\&\#[0-9]\;/) {
warn "Bad entity detected";
$origtext =~ s/\&\#[0-9]\;//g;
}
}
$self->SUPER::text($origtext,$iscdata);
}
}
our @ISA = ("XML::LibXML");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Win32/GUI/XMLBuilder.pm view on Meta::CPAN
& ampersand (&)
' apostrophe (')
" quotation mark (")
you can use the alternative predefined entity reference or enclose this data in a "<![CDATA[" "]]>" section.
Please look at the samples and read http://www.w3schools.com/xml/xml_cdata.asp.
The <WGXPre> element was previously called <PreExec>. The <PreExec> tag is deprecated but remains
only for backward compatibility and will be removed in a later release.
=cut
lib/Win32/GUI/XMLBuilder.pm view on Meta::CPAN
$self->debug($e->text);
my $ret = eval "{ package main; no strict; ".$e->text."}";
print STDERR "$@" if $@;
$self->debug($ret);
$e->set_text('');
my $pcdata= XML::Twig::Elt->new(XML::Twig::ENT, $ret);
$pcdata->paste($e);
$e->erase();
}
=item <WGXExec>
view all matches for this distribution
view release on metacpan or search on metacpan
SMTO_NORMAL, 5000, &dwResult);
XSRETURN_EMPTY;
}
void
SetLocaleInfo(lcid,lctype,lcdata)
IV lcid
IV lctype
char *lcdata
PPCODE:
{
BOOL result = SetLocaleInfoA((LCID)lcid, (LCTYPE)lctype, lcdata);
if (result)
XSRETURN_YES;
XSRETURN_EMPTY;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/wordpress-2.8.4-xmlrpc.php view on Meta::CPAN
$enclosure = array();
foreach ( (array) get_post_custom($post_ID) as $key => $val) {
if ($key == 'enclosure') {
foreach ( (array) $val as $enc ) {
$encdata = split("\n", $enc);
$enclosure['url'] = trim(htmlspecialchars($encdata[0]));
$enclosure['length'] = trim($encdata[1]);
$enclosure['type'] = trim($encdata[2]);
break 2;
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
pod/wurst.pod view on Meta::CPAN
These stand for "Needleman and Wunsch" and "Smith and
Waterman" respectively. Any other value will cause an error.
=back
=item svm_rs_cdata MODEL NATIVE SCOR_SET RS_PARAM CVTYPE
*EXPERIMENTAL!*
The function returns an array of training vectors suitable
for use in training a support vector machine (libSVM.pm) or
pod/wurst.pod view on Meta::CPAN
=item svm_rsfeat MODEL SCOR_SET RS_PARAMS CVTYPE
This returns a set of feature vectors for each position in
MODEL, calculated from local sequence-structure fitness and
residue-specific interaction terms according to the CVTYPE
scheme (see svm_rs_cdata or scoranlys.c for details). The
form is as follows :
my @m_fvset = svm_rsfeat MODEL, SCOR_SET, PARAMS, 0
@m_fvset is of form
[ (undef), [feature vector], .., .., (undef)]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Wx/Perl/TreeView.pm view on Meta::CPAN
$tree->SetItemHasChildren( $item, 0 );
return;
}
for( my $i = 0; $i < $count; ++$i ) {
my( $ccookie, $cstring, $cimage, $ccdata ) =
$model->get_child( $cookie, $i );
my $child = $tree->AppendItem
( $item, $cstring, ( defined $cimage ? $cimage : -1 ), -1,
Wx::TreeItemData->new( { cookie => $ccookie, data => $ccdata } ) );
$tree->SetItemHasChildren( $child, $model->has_children( $ccookie ) );
}
}
=head2 reload
lib/Wx/Perl/TreeView.pm view on Meta::CPAN
return $can_refresh;
}
sub _check {
my( $self, $pitem, $pcookie, $pstring, $pimage, $pcdata,
$is_expanding ) = @_;
my( $model, $tree ) = ( $self->model, $self->treectrl );
my $data = { text => $pstring,
image => $pimage,
cookie => $pcookie,
data => $pcdata,
childs => [],
};
return ( 1, $data ) if grep $_ == $pitem, @$is_expanding;
return ( 1, $data ) unless $tree->IsExpanded( $pitem );
my $cchilds = $tree->GetChildrenCount( $pitem, 0 );
lib/Wx/Perl/TreeView.pm view on Meta::CPAN
return ( 0, undef ) if $cchilds != $mchilds;
my( $child, $cookie ) = $tree->GetFirstChild( $pitem );
my $index = 0;
while( $child->IsOk ) {
my( $ccookie, $cstring, $cimage, $ccdata ) =
$model->get_child( $pcookie, $index );
my( $can_refresh, $cdata ) = $self->_check
( $child, $ccookie, $cstring, $cimage, $ccdata, $is_expanding );
return ( 0, undef ) unless $can_refresh;
push @{$data->{childs}}, $cdata;
( $child, $cookie ) = $tree->GetNextChild( $pitem, $cookie );
++$index;
}
return ( 1, $data );
view all matches for this distribution
view release on metacpan or search on metacpan
ext/ribbon/t/03_threads.t view on Meta::CPAN
my $artprov4 = Wx::RibbonDefaultArtProvider->new();
my $rgitem1 = $rgallery->Append( Wx::Bitmap->new( 100, 100, -1 ), -1, MyDataContainer->new('Stashed Data 0'));
my $rgitem2 = $rgallery->Append( Wx::Bitmap->new( 100, 100, -1 ), -1, MyDataContainer->new('Stashed Data 1'));
my $cdata1 = $rgallery->GetItemClientData( $rgitem1 );
my $cdata2 = $rgitem2->GetClientData();
my ( $buttonbar, $button, $buttonbar2, $button2, $buttonbar3, $button3 );
if ( Wx::wxVERSION < 3.000000 ) {
$buttonbar = Wx::RibbonButtonBar->new($rpanel, -1 );
ext/ribbon/t/03_threads.t view on Meta::CPAN
my $toolbar3 = Wx::RibbonToolBar->new($rpanel, 1 );
my $tool3 = $toolbar3->AddTool(-1, Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap,
"HW Help", Wx::wxRIBBON_BUTTON_NORMAL(),
{ data => 'Stashed Data' } );
isa_ok($cdata1, 'MyDataContainer');
is( $cdata1->{somedata}, 'Stashed Data 0' );
isa_ok($cdata2, 'MyDataContainer');
is( $cdata2->{somedata}, 'Stashed Data 1' );
undef $artprov2;
undef $artprov4;
undef $rgitem2;
undef $buttonbar2;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XAO/DO/Data/Index.pm view on Meta::CPAN
}
=cut
sub search_by_string ($$$;$) {
my ($self,$ordering,$str,$rcdata)=@_;
return $self->indexer->search(
index_object => $self,
search_string => $str,
ordering => $ordering,
rcdata => $rcdata,
);
}
###############################################################################
lib/XAO/DO/Data/Index.pm view on Meta::CPAN
may take significant time!
=cut
sub search_by_string_oid ($$$;$) {
my ($self,$ordering,$str,$rcdata)=@_;
my $cids=$self->indexer->search(
index_object => $self,
search_string => $str,
ordering => $ordering,
rcdata => $rcdata,
);
my $coll_obj=$self->get_collection_object;
my @oids;
foreach my $cid (@$cids) {
lib/XAO/DO/Data/Index.pm view on Meta::CPAN
EXPERIMENTAL UNSTABLE API.
=cut
sub suggest_alternative ($$$$;$) {
my ($self,$ordering,$str,$rcdata,$need_results)=@_;
return $self->indexer->suggest_alternative(
index_object => $self,
search_string => $str,
ordering => $ordering,
rcdata => $rcdata,
need_results => $need_results,
);
}
###############################################################################
view all matches for this distribution
view release on metacpan or search on metacpan
Generator/Common.pm view on Meta::CPAN
[ @XFORMS_ATTRIBUTE_LINKING ],
0,
[ "##ANYDOM##" ],
[], ],
"xforms:submission" => [ [ "action", "method", "id" ],
[ "cdata-section-elements", "encoding",
"indent", "omit-xml-declaration",
"ref", "replace", "seperator",
"standalone", "version" ],
1,
[],
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL
MANIFEST This list of files
META.yml
README
t/args.t
t/cdata.t
t/changes.t
t/checkbox.t
t/checkbox_loop.t
t/checkbox_loop2.t
t/coverage.t
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XHTML/MediaWiki.pm view on Meta::CPAN
# warn "_html_comment: " . join(' ', @_);
}
sub _html_text
{
my ($parser, $dtext, $skipped_text, $is_cdata) = @_;
my @tagstack = @{$parser->{tag_stack}};
my ($newtext, $newstate);
if (my ($leading) = ($dtext =~ /^(\n+)/m)) {
my $x = length($leading);
$parser->end_line($x);
$dtext = substr($dtext, $x);
}
if ($is_cdata && $parser->can_cdata) {
$newtext = $dtext;
} else {
$newtext = encode($dtext);
}
lib/XHTML/MediaWiki.pm view on Meta::CPAN
use base 'HTML::Parser';
use Params::Validate qw (validate);
sub can_cdata
{
my $self = shift;
if (my $current = $self->check_current_block) {
return $self->{tags}{$current->{type}}{can_cdata};
}
return 0;
}
sub end_line
lib/XHTML/MediaWiki.pm view on Meta::CPAN
my $parser = XHTML::MediaWiki::Parser->new
(start_h => [\&_html_tag, 'self, "S", tagname, text, attr'],
end_h => [\&_html_tag, 'self, "E", tagname, text'],
comment_h => [\&_html_comment, 'self, text'],
text_h => [\&_html_text, 'self, dtext, skipped_text, is_cdata'],
marked_sections => 1,
boolean_attribute_value => '__TEXT_MEDIAWIKIFORMAT_BOOL__',
);
$parser->{opts} = {},
$parser->{tags} = {
lib/XHTML/MediaWiki.pm view on Meta::CPAN
rb => {},
rp => {},
rt => {},
ruby => {
block => 'ruby',
can_cdata => 1,
},
s => {},
samp => {},
small => {},
strike => {},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XML/API.pm view on Meta::CPAN
if ( $self->{comment} ) {
return $indent . '<!-- ' . $self->{comment} . ' -->';
}
if ( $self->{cdata} ) {
return $indent . '<![CDATA[' . $self->{cdata} . ']]>';
}
if ( !@{ $self->{contents} } ) {
return
$indent . '<'
lib/XML/API.pm view on Meta::CPAN
sub fast_string {
my $self = shift;
$self->{comment} && return '';
$self->{cdata} && return '<![CDATA[' . $self->{cdata} . ']]>';
return
'<'
. ( $self->{ns} ? $self->{ns} . ':' : '' )
. $self->{element}
lib/XML/API.pm view on Meta::CPAN
# FIXME: should escape?
$self->_raw( XML::API::Element->new( comment => join( '', @_ ) ) );
return;
}
sub _cdata {
my $self = shift;
$self->_raw( XML::API::Element->new( cdata => join( '', @_ ) ) );
return;
}
sub _css {
my $self = shift;
lib/XML/API.pm view on Meta::CPAN
$x->_raw('-->')
Except that indentation is correct. Any occurences of '--' in $content
will be replaced with '- -'.
=head2 $x->_cdata($content)
A shortcut for $x->_raw("\n<![CDATA[", $content, " ]]>");
=head2 $x->_css($content )
view all matches for this distribution