view release on metacpan or search on metacpan
scripts/mkxmlwritersimple view on Meta::CPAN
die "No file supplied\n" unless $xmlfile && -f $xmlfile;
my %tags;
my $code = dt( $xmlfile,
-pcdata => sub {
return "" if $c =~ m/^[\s\n\r]+$/;
$c =~ s/"/\\"/g;
$c =~ s/\$/\\\$/g;
'"' . $c . '",';
},
view all matches for this distribution
view release on metacpan or search on metacpan
XMLWriter.pm view on Meta::CPAN
my $doc = new XML::XMLWriter(system => 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd',
public => '-//W3C//DTD XHTML 1.0 Transitional//EN');
my $html = $doc->createRoot;
$html->head->title->_pcdata('A Table');
my $body = $html->body;
$body->h1->_pcdata('Here is a table!');
my $table = $body->table({align => 'center', cellspacing => 1, cellpadding => 2, border => 1});
for(my $i=0; $i<@data; $i++) {
my $tr = $table->tr;
foreach $_ (@{$data[$i]}) {
$i==0 ? $tr->th->_pcdata($_) : $tr->td->_pcdata($_);
}
}
$body->b->_pcdata("that's it!");
$doc->print();
=head2 Example Output
<?xml version="1.0" encoding="ISO-8859-15" standalone="no"?>
XMLWriter.pm view on Meta::CPAN
the start tag. Defaults to undef, which means no data will be added.
=back
Instead of passing the third argument you can also just do a
C<$root-E<gt>_pcdata(yourdata)>, its exactly the same.
=cut
######################################################################
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XML/XOXO/Node.pm view on Meta::CPAN
'\'' => '''
);
my $RE = join '|', keys %Map;
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
samples/REC-xml-19980210.xml view on Meta::CPAN
may be used for
formal declaration of PI targets.
</p>
</div2>
<div2 id='sec-cdata-sect'>
<head>CDATA Sections</head>
<p><termdef id="dt-cdsection" term="CDATA Section"><term>CDATA sections</term>
may occur
anywhere character data may occur; they are
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XML/XSH/Completion.pm view on Meta::CPAN
our $match_no_xpath=join '|',@XML::XSH::CompletionList::XSH_NOXPATH_COMMANDS;
our $match_no=qr/${M}(?:${match_no_xpath}|create\s+[a-zA-Z0-9_]*\s)\s*$/;
# PATH-completion: system, !, exec, |,
our @nodetypes = qw(element attribute attributes text cdata pi comment chunk entity_reference);
our @openflags1 = qw(HTML XML DOCBOOK);
our @openflags2 = qw(FILE PIPE STRING);
our @saveflags1 = qw(HTML XML XINCLUDE);
our @saveflags2 = qw(FILE PIPE STRING);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XML/XSH2/Completion.pm view on Meta::CPAN
our $OPER = qr/(?:[,=<>\+\|]|-(?!$NAME)|(?:vid|dom|dna|ro)(?=\s*\]|\s*\)|\s*[0-9]+(?!$NNAMECHAR)|\s+{$NAMECHAR}|\s+\*))/;
# PATH-completion: system, !, exec, |,
our @nodetypes = qw(element attribute attributes text cdata pi comment chunk entity_reference);
sub complete_option {
my ($l)=@_;
if ($l=~/\s--encoding\s+$|\s:e\s+$/) {
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XML/XSLT.pm view on Meta::CPAN
# Revision 1.16 2002/01/09 09:17:40 gellyfish
# * added test for <xsl:text>
# * Stylesheet whitespace stripping as per spec and altered tests ...
#
# Revision 1.15 2002/01/08 10:11:47 gellyfish
# * First cut at cdata-section-element
# * test for above
#
# Revision 1.14 2001/12/24 16:00:19 gellyfish
# * Version released to CPAN
#
lib/XML/XSLT.pm view on Meta::CPAN
$self->doctype_public($dp);
my $ds = defined $doctype_system ? $doctype_system->getNodeValue : '';
$self->doctype_system($ds);
# cdata-section-elements should only be used if the output type
# is XML but as we are not checking that right now ...
my $cdata_section = $attribs->getNamedItem('cdata-section-elements');
if ( defined $cdata_section )
{
my $cdata_sections = [];
@{$cdata_sections} = split /\s+/, $cdata_section->getNodeValue();
$self->cdata_sections($cdata_sections);
}
}
else
{
$self->debug("Default Output options being used");
lib/XML/XSLT.pm view on Meta::CPAN
}
return exists $self->{OMIT_XML_DECL} ? $self->{OMIT_XML_DECL} : 0;
}
sub cdata_sections
{
my ( $self, $cdata_sections ) = @_;
if ( defined $cdata_sections )
{
$self->{CDATA_SECTIONS} = $cdata_sections;
}
$self->{CDATA_SECTIONS} = [] unless exists $self->{CDATA_SECTIONS};
return wantarray() ? @{ $self->{CDATA_SECTIONS} } : $self->{CDATA_SECTIONS};
}
sub is_cdata_section
{
my ( $self, $element ) = @_;
my %cdata_sections;
my @cdata_temp = $self->cdata_sections();
@cdata_sections{@cdata_temp} = (1) x @cdata_temp;
my $tagname;
if ( defined $element and ref($element) and ref($element) eq 'XML::DOM' )
{
lib/XML/XSLT.pm view on Meta::CPAN
$tagname = $element;
}
# Will need to do namespace checking on this really
return exists $cdata_sections{$tagname} ? 1 : 0;
}
sub output_version
{
my ( $self, $output_version ) = @_;
lib/XML/XSLT.pm view on Meta::CPAN
{
$self->debug( $ns . " does not match " . $self->xsl_ns() );
# not entirely sure if this right but the spec is a bit vague
if ( $self->is_cdata_section($xsl_tag) )
{
$self->debug("This is a CDATA section element");
$self->_add_cdata_section( $xsl_node, $current_xml_node,
$current_xml_selection_path, $current_result_node, $variables,
$oldvariables );
}
else
{
lib/XML/XSLT.pm view on Meta::CPAN
}
$self->_outdent();
}
sub _add_cdata_section
{
my ( $self, $xsl_node, $current_xml_node, $current_xml_selection_path,
$current_result_node, $variables, $oldvariables )
= @_;
my $node = $self->xml_document()->createElement( $xsl_node->getTagName );
my $cdata = '';
foreach my $child_node ( $xsl_node->getChildNodes() )
{
if ( $child_node->can('asString') )
{
$cdata .= $child_node->asString();
}
else
{
$cdata .= $child_node->getNodeValue();
}
}
$node->addCDATA($cdata);
$current_result_node->appendChild($node);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XML/XSPF.pm view on Meta::CPAN
$writer->startTag('track');
for my $element (qw(location identifier)) {
for my $cdata (@{$track->get("${element}s")}) {
$writer->dataElement($element, $cdata);
}
}
for my $element (qw(link meta)) {
for my $cdata (@{$track->get("${element}s")}) {
$writer->startTag($element, 'rel' => $cdata->[0]);
$writer->characters($cdata->[1]);
$writer->endTag($element);
}
}
for my $element (qw(title creator annotation info image album trackNum duration)) {
lib/XML/XSPF.pm view on Meta::CPAN
my $path = $parser->{'_xspf'}->{'path'} .= "/$element";
my $self = $parser->{'_xspf'}->{'self'};
push @{ $parser->{'_xspf'}->{'states'} }, {
'attributes' => \%attributes,
'cdata' => '',
'path' => $path,
};
# Set some default types once we encounter them.
if ($path eq '/playlist/attribution') {
lib/XML/XSPF.pm view on Meta::CPAN
my ($parser, $value) = @_;
# Keep the our little state machine chugging along
my $state = pop @{ $parser->{'_xspf'}->{'states'} };
$state->{'cdata'} .= $value;
push @{ $parser->{'_xspf'}->{'states'} }, $state;
}
sub handleEndElement {
my ($parser, $element) = @_;
my $state = pop @{ $parser->{'_xspf'}->{'states'} };
my $value = $state->{'cdata'};
my $path = $parser->{'_xspf'}->{'path'};
my $self = $parser->{'_xspf'}->{'self'};
# These are all single value elements.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XML/XSS/Text.pm
t/00-compile.t
t/00-report-prereqs.dd
t/00-report-prereqs.t
t/basic.t
t/cdata.t
t/document.t
t/element.t
t/escaping.t
t/lib/A.pm
t/lib/Beta.pm
view all matches for this distribution
view release on metacpan or search on metacpan
docs/XMLUni.txt view on Meta::CPAN
fgXercesStandardUriConformant: http://apache.org/xml/features/standard-uri-conformant
fgSAX2CoreValidation: http://xml.org/sax/features/validation
fgSAX2CoreNameSpaces: http://xml.org/sax/features/namespaces
fgSAX2CoreNameSpacePrefixes: http://xml.org/sax/features/namespace-prefixes
fgDOMCanonicalForm: canonical-form
fgDOMCDATASections: cdata-sections
fgDOMComments: comments
fgDOMCharsetOverridesXMLEncoding: charset-overrides-xml-encoding
fgDOMDatatypeNormalization: datatype-normalization
fgDOMEntities: entities
fgDOMInfoset: infoset
docs/XMLUni.txt view on Meta::CPAN
fgDOMWRTCanonicalForm: canonical-form
fgDOMWRTDiscardDefaultContent: discard-defaullt-content
fgDOMWRTEntities: entities
fgDOMWRTFormatPrettyPrint: format-pretty-print
fgDOMWRTNormalizeCharacters: normalize-characters
fgDOMWRTSplitCdataSections: split-cdata-sections
fgDOMWRTValidation: validation
fgDOMWRTWhitespaceInElementContent: whitespace-in-element-content
fgDOMWRTBOM: http://apache.org/xml/features/dom/byte-order-mark
fgXercescDefaultLocale: en_US
view all matches for this distribution
view release on metacpan or search on metacpan
regerror.cc view on Meta::CPAN
#if !defined(_WIN32) && !defined(__DragonFly__) && !defined(__NetBSD__)
#define _XSFW_SKIP_CHECK 1
#endif
void register_error_constants () {
struct ecdata {
panda::string_view long_name;
panda::string_view short_name;
std::errc value;
};
Stash errc_stash("XS::STL::errc", GV_ADD);
std::initializer_list<ecdata> list = {
{"address_family_not_supported", "EAFNOSUPPORT", std::errc::address_family_not_supported},
{"address_in_use", "EADDRINUSE", std::errc::address_in_use},
{"address_not_available", "EADDRNOTAVAIL", std::errc::address_not_available},
{"already_connected", "EISCONN", std::errc::already_connected},
{"argument_list_too_long", "E2BIG", std::errc::argument_list_too_long},
view all matches for this distribution
view release on metacpan or search on metacpan
t/pkgconfig/mylib.pc
t/pkgconfig/mylib1.pc
t/pkgconfig/mylib2.pc
t/pkgconfig/pkgconfig.t
t/src.t
t/testmod/data/ccdat/ccdata1.bin
t/testmod/data/ccdat/ccdata2.bin
t/testmod/data/data.txt
t/testmod/data/db.db
t/testmod/file1.c
t/testmod/file1.h
t/testmod/file2.cc
view all matches for this distribution
view release on metacpan or search on metacpan
include/parse_subsignature_ex.h view on Meta::CPAN
OP *XPS_parse_subsignature_ex(pTHX_ int flags,
struct XPSContextWithPointer *ctx,
struct HooksAndData hooksanddata[],
size_t nhooks);
#define register_subsignature_attribute(name, funcs, funcdata) XPS_register_subsignature_attribute(aTHX_ name, funcs, funcdata)
void XPS_register_subsignature_attribute(pTHX_ const char *name, const struct XPSSignatureAttributeFuncs *funcs, void *funcdata);
view all matches for this distribution
view release on metacpan or search on metacpan
include/boost/test/impl/junit_log_formatter.ipp view on Meta::CPAN
<< " message" << utils::attr_value() << log.logentry_message
<< " type" << utils::attr_value() << log.logentry_type
<< ">";
if(!log.output.empty()) {
m_stream << utils::cdata() << "\n" + log.output;
}
m_stream << "</" << entry_type << ">";
}
struct conditional_cdata_helper {
std::ostream &ostr;
std::string const field;
bool empty;
conditional_cdata_helper(std::ostream &ostr_, std::string field_)
: ostr(ostr_)
, field(field_)
, empty(true)
{}
~conditional_cdata_helper() {
if(!empty) {
ostr << BOOST_TEST_L( "]]>" ) << "</" << field << '>' << std::endl;
}
}
include/boost/test/impl/junit_log_formatter.ipp view on Meta::CPAN
void write_testcase_system_out(junit_impl::junit_log_helper const &detailed_log,
test_unit const * tu,
bool skipped) const
{
// system-out + all info/messages, the object skips the empty entries
conditional_cdata_helper system_out_helper(m_stream, "system-out");
// indicate why the test has been skipped first
if( skipped ) {
std::list<std::string> skipping_decision_chain = build_skipping_chain(*tu);
for(list_str_citerator it(skipping_decision_chain.begin()), ite(skipping_decision_chain.end());
include/boost/test/impl/junit_log_formatter.ipp view on Meta::CPAN
}
if(!detailed_log.system_err.empty())
o << std::endl << "STDERR END ------------" << std::endl;
conditional_cdata_helper system_err_helper(m_stream, "system-err");
system_err_helper(o.str());
}
}
int get_nb_assertions(junit_impl::junit_log_helper const &detailed_log,
view all matches for this distribution
view release on metacpan or search on metacpan
c-ares-1.34.3/Makefile.netware view on Meta::CPAN
ifeq ($(DB),DEBUG)
@echo $(DL)debug$(DL) >> $@
endif
@echo $(DL)threadname "$^"$(DL) >> $@
ifdef XDCOPT
@echo $(DL)xdcdata $(@:.def=.xdc)$(DL) >> $@
endif
ifeq ($(LDRING),0)
@echo $(DL)flag_on 16$(DL) >> $@
endif
ifeq ($(LDRING),3)
view all matches for this distribution
view release on metacpan or search on metacpan
libdwarf-code-0.11.1/src/bin/dwarfgen/irepform.h view on Meta::CPAN
IRFormExprloc & operator=(const IRFormExprloc &r) {
if (this == &r) return *this;
finalform_ = r.finalform_;
initialform_ = r.initialform_;
formclass_ = r.formclass_;
exprlocdata_ = r.exprlocdata_;
return *this;
};
IRFormExprloc(const IRFormExprloc &r) {
finalform_ = r.finalform_;
initialform_ = r.initialform_;
formclass_ = r.formclass_;
exprlocdata_ = r.exprlocdata_;
}
virtual IRFormExprloc * clone() const {
return new IRFormExprloc(*this);
}
void setInitialForm(Dwarf_Half v) { initialform_ = v;}
void setFinalForm(Dwarf_Half v) { finalform_ = v;}
Dwarf_Half getInitialForm() { return initialform_;}
Dwarf_Half getFinalForm() {return finalform_;}
enum Dwarf_Form_Class getFormClass() const { return formclass_; };
std::vector<char> getexprlocdata() const {return exprlocdata_; };
void insertBlock(Dwarf_Unsigned len, Dwarf_Ptr data) {
char *d = static_cast<char *>(data);
exprlocdata_.clear();
exprlocdata_.insert(exprlocdata_.end(),d+0,d+len);
};
private:
Dwarf_Half finalform_;
// In most cases directform == indirect form.
// Otherwise, directform == DW_FORM_indirect.
Dwarf_Half initialform_;
enum Dwarf_Form_Class formclass_;
std::vector<char> exprlocdata_;
};
class IRFormFlag : public IRForm {
public:
IRFormFlag():
view all matches for this distribution
view release on metacpan or search on metacpan
geos-3.7.3/tests/xmltester/tinyxml/tinyxml.cpp view on Meta::CPAN
void TiXmlText::Print( FILE* cfile, int depth ) const
{
assert( cfile );
if ( cdata )
{
int i;
fprintf( cfile, "\n" );
for ( i=0; i<depth; i++ ) {
fprintf( cfile, " " );
geos-3.7.3/tests/xmltester/tinyxml/tinyxml.cpp view on Meta::CPAN
void TiXmlText::CopyTo( TiXmlText* target ) const
{
TiXmlNode::CopyTo( target );
target->cdata = cdata;
}
bool TiXmlText::Accept( TiXmlVisitor* visitor ) const
{
view all matches for this distribution
view release on metacpan or search on metacpan
range-v3-0.12.0/doc/release_notes.md view on Meta::CPAN
- `ranges::cbegin`
- `ranges::cend`
- `ranges::crbegin`
- `ranges::crend`
- `ranges::data`
- `ranges::cdata`
* Iterators may specify an `iterator_concept` type alias in addition to
`iterator_category` -- either as a nested type or as a member of a
`std::iterator_traits` specialization -- to denote conformance to the C++20
iterator concepts as distinct from the C++98 iterator requirements.
(See [P1037 "Deep Integration of the Ranges TS"](http://wg21.link/p1037)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/blx/xsdsql/xml/reader.pm view on Meta::CPAN
,Entity => \&_entity_node
,Element => \&_element_node
,Attlist => \&_attlist_node
,ExternEnt => \&_externent_node
,DoctypeFin => \&_doctypefin_node
# ,CDataStart => \&_cdatastart_node
,XMLDecl => \&_xmldecl_node
);
$class->SUPER::_new(%params);
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/js/jslib/utils/sax.js view on Meta::CPAN
this.str = this.str.substring(close + 1,this.str.length);
continue;
}
// leftovers are cdata
if(estart == -1)
{
this.handler.characters(this.entityCheck(this.str));
this.str = "";
}else{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Xacobeo/UI/SourceView.pm view on Meta::CPAN
_add_tag($tag_table, literal =>
foreground => 'black',
);
_add_tag($tag_table, cdata =>
foreground => 'red',
weight => PANGO_WEIGHT_BOLD
);
_add_tag($tag_table, cdata_content =>
foreground => 'purple',
weight => PANGO_WEIGHT_LIGHT,
style => 'italic',
);
view all matches for this distribution
view release on metacpan or search on metacpan
X11/Xforms/Xforms.h view on Meta::CPAN
typedef struct
{
void *fdui; /* for fdesign */
void *u_vdata; /* for application */
#if FL_INCLUDE_VERSION >= 87
char *u_cdata;
#endif
long u_ldata;
char *label; /* window title */
unsigned long window; /* X resource ID for window */
X11/Xforms/Xforms.h view on Meta::CPAN
typedef struct
{
struct forms_ *form; /* the form this object belong */
void *u_vdata; /* anything user likes */
#if FL_INCLUDE_VERSION >= 87
char *u_cdata;
#endif
long u_ldata; /* anything user lines */
int flo_int2[3];
/* int objclass; /* class of object, button, slider etc */
X11/Xforms/Xforms.h view on Meta::CPAN
/* int visible;*/
/* int clip;*/
unsigned long click_timeout;
void *c_vdata; /* for class use */
#if FL_INCLUDE_VERSION >= 87
char *c_cdata; /* for class use */
#endif
long c_ldata; /* for class use */
#if FL_INCLUDE_VERSION >= 87
unsigned int spec_size; /* for internal use */
FL_COLOR aux_col1, aux_col2;/* aux colors */
view all matches for this distribution
view release on metacpan or search on metacpan
lib/YAX/Node.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is used both as a base for L<YAX::Elememt>, L<YAX::Text>
and L<YAX::Fragment>. It is also partly mixed into L<YAX::Document>.
It is also used to represent comment, cdata sections and processing
instruction nodes.
=head1 METHODS
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/x86_64-linux-thread/HTML/Parser.pm view on Meta::CPAN
"by HTML::Parser $VERSION");
}
if ($api_version < 3) {
# Set up method callbacks compatible with HTML-Parser-2.xx
$self->handler(text => "text", "self,text,is_cdata");
$self->handler(end => "end", "self,tagname,text");
$self->handler(process => "process", "self,token0,text");
$self->handler(start => "start",
"self,tagname,attr,attrseq,text");
local/lib/perl5/x86_64-linux-thread/HTML/Parser.pm view on Meta::CPAN
Event causes the event name to be passed.
The event name is one of C<text>, C<start>, C<end>, C<declaration>,
C<comment>, C<process>, C<start_document> or C<end_document>.
=item C<is_cdata>
Is_cdata causes a TRUE value to be passed if the event is inside a CDATA
section or between literal start and end tags (C<script>,
C<style>, C<xmp>, C<iframe>, C<title>, C<textarea> and C<plaintext>).
if the flag is FALSE for a text event, then you should normally
either use C<dtext> or decode the entities yourself before the text is
local/lib/perl5/x86_64-linux-thread/HTML/Parser.pm view on Meta::CPAN
This is equivalent to the following method calls:
$p->handler(start => "start", "self, tagname, attr, attrseq, text");
$p->handler(end => "end", "self, tagname, text");
$p->handler(text => "text", "self, text, is_cdata");
$p->handler(process => "process", "self, token0, text");
$p->handler(
comment => sub {
my ($self, $tokens) = @_;
for (@$tokens) { $self->comment($_); }
view all matches for this distribution
view release on metacpan or search on metacpan
- &boolean(1,2,3) now dies like boolean(1,2,3)
- &boolean() now dies like boolean()
0.24 Thu Jan 13 15:27:09 EST 2011
- @Schwern++ found out how to make true and false immutable. Kudos to
#strategicdata++.
- Document the boolean() function.
- Added is_true and is_false methods.
- Added boolean, is_true, and is_false autobox methods
0.23 Thu Sep 16 19:27:54 PDT 2010
view all matches for this distribution
view release on metacpan or search on metacpan
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
element_start, // the first tag of an element
element_end, // the last tag of an element
empty_element, // the singular tag of an empty element
pi, // processing instruction
chars, // the non-markup data between tags
chars_cdata, // the data from a CDATA section
eof, // this token is returned when we reach the end of input
error, // this token indicates that the tokenizer couldn't
// determine which category the next token fits into
dtd, // this token is for an entire dtd
comment // this is a token for comments
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
dh_list[i]->start_document();
}
std::string chars_buf; // used to collect chars data between consecutive
// chars and chars_cdata tokens so that
// document_handlers receive all chars data between
// tags in one call
// variables to be used with the parsing functions
attrib_list atts;
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
}
}break;
// ----------------------------------------
case chars_cdata:
{
if (tags.size() != 0)
{
chars_buf += token_text;
}
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
break;
get_next_token(in,token_text,token_kind,line_number);
// if the next token is not a chars or chars_cdata token then flush
// the chars_buf to the document_handlers
if ( (token_kind != chars) &&
(token_kind != chars_cdata) &&
(token_kind != dtd) &&
(token_kind != comment) &&
(chars_buf.size() != 0)
)
{
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
switch (ch2)
{
// ---------------------------------
// this is a dtd, comment, or chars_cdata token
case '!':
{
// if this is a CDATA section *******************************
if ( in.peek() == '[')
{
token_kind = chars_cdata;
// throw away the '['
in.get();
// make sure the next chars are CDATA[
view all matches for this distribution
view release on metacpan or search on metacpan
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
element_start, // the first tag of an element
element_end, // the last tag of an element
empty_element, // the singular tag of an empty element
pi, // processing instruction
chars, // the non-markup data between tags
chars_cdata, // the data from a CDATA section
eof, // this token is returned when we reach the end of input
error, // this token indicates that the tokenizer couldn't
// determine which category the next token fits into
dtd, // this token is for an entire dtd
comment // this is a token for comments
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
dh_list[i]->start_document();
}
std::string chars_buf; // used to collect chars data between consecutive
// chars and chars_cdata tokens so that
// document_handlers receive all chars data between
// tags in one call
// variables to be used with the parsing functions
attrib_list atts;
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
}
}break;
// ----------------------------------------
case chars_cdata:
{
if (tags.size() != 0)
{
chars_buf += token_text;
}
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
break;
get_next_token(in,token_text,token_kind,line_number);
// if the next token is not a chars or chars_cdata token then flush
// the chars_buf to the document_handlers
if ( (token_kind != chars) &&
(token_kind != chars_cdata) &&
(token_kind != dtd) &&
(token_kind != comment) &&
(chars_buf.size() != 0)
)
{
src/dlib/xml_parser/xml_parser_kernel_1.h view on Meta::CPAN
switch (ch2)
{
// ---------------------------------
// this is a dtd, comment, or chars_cdata token
case '!':
{
// if this is a CDATA section *******************************
if ( in.peek() == '[')
{
token_kind = chars_cdata;
// throw away the '['
in.get();
// make sure the next chars are CDATA[
view all matches for this distribution
view release on metacpan or search on metacpan
util/anno_server view on Meta::CPAN
sub check_auth {
my $self = shift;
my ($string, $server) = @_;
# bits from HTTPD::Authen (corrected) and LWP
my %cdata = $self->parse_digest_request($string);
exists($cdata{username}) or return;
# XXX may not have a cleartext password, but I need at least H(A1)
my $password = $server->can('get_password') ?
$server->get_password($cdata{username}) : undef;
#warn "user's password: $password\n";
return($self->verify_digest(
%cdata,
_server => $server,
_password => $password,
));
} # end subroutine check_auth definition
########################################################################
util/anno_server view on Meta::CPAN
=head2 parse_digest_request
See rfc2617 "3.2.2 The Authorization Request Header"
(http://www.ietf.org/rfc/rfc2617.txt).
my %cdata = $self->parse_digest_request($string);
=cut
sub parse_digest_request {
my $self = shift;
my ($string) = @_;
my %cdata;
while($string =~ s/^([a-z-]+)=((?:"[^"]+")|[^,]+)(?:, *|$)//) {
my ($k, $v) = ($1, $2);
($v =~ s/^"//) and ($v =~ s/"$//); # could be harsher
exists($cdata{$k}) and die "duplicate key $k";
$cdata{$k} = $v;
}
$string and die "now I'm mad ($string)";
0 and warn "we parsed: ",
join(", ", map({"$_ => $cdata{$_}"} keys %cdata));
return(%cdata);
} # end subroutine parse_digest_request definition
########################################################################
=head2 verify_digest
$username = $self->verify_digest(
%cdata,
_server => $server,
_password => $password,
);
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
GO/IO/OBDXML.pm view on Meta::CPAN
}
# Populate the node with: label, source, and description.
if( $label ){
$self->{writer}->startTag('label');
$self->{writer}->cdata($label);
$self->{writer}->endTag('label');
}
if( $source ){
$self->{writer}->emptyTag('source', 'about'=>$source);
}
GO/IO/OBDXML.pm view on Meta::CPAN
if( $type ){ $attr_hash{'type'} = $type; }
$self->{writer}->startTag($tag,
%attr_hash);
$self->{writer}->startTag('label');
$self->{writer}->cdata($label);
$self->{writer}->endTag('label');
$self->{writer}->endTag($tag);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XML/Checker.pm view on Meta::CPAN
$self->Char ($data);
}
}
# PerlSAX API
sub start_cdata
{
$_[0]->{InCDATA} = 1;
}
# PerlSAX API
sub end_cdata
{
$_[0]->{InCDATA} = 0;
}
sub Char
lib/XML/Checker.pm view on Meta::CPAN
}
# Treat CDATASection same as Char (Text)
sub CData
{
my ($self, $cdata) = @_;
my $context = $self->{Context};
$context->[0]->Char ($self, $cdata);
# CDATASection can never be insignificant whitespace
$INSIGNIF_WS = 0;
#?? I'm not sure if this assumption is correct
}
lib/XML/Checker.pm view on Meta::CPAN
XML::Checker now also supports the PerlSAX interface, so you can use XML::Checker
wherever you use PerlSAX handlers.
XML::Checker implements the following methods: start_document, end_document,
start_element, end_element, characters, processing_instruction, comment,
start_cdata, end_cdata, entity_reference, notation_decl, unparsed_entity_decl,
entity_decl, element_decl, attlist_decl, doctype_decl, xml_decl
Not implemented: set_document_locator, ignorable_whitespace
See PerlSAX.pod for details. (It is called lib/PerlSAX.pod in the libxml-perl
view all matches for this distribution