Sablotron/DOM/YYLex.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 37 CC 1 SCAR 6.9
CC
1
Cov
0%
_xml_getDocumentElement
2.0
_xml_isTextNode
2.0
_xml_isElementNode
2.0
CRAP 2.0
1 #!/usr/local/bin/perl -w
2 ##
3 ## YYLex.pm
4 ##
5 ## Daniel Bößwetter, Mon Nov 18 11:42:40 CET 2002
6 ## boesswetter@peppermind.de
7 ##
8 ## $Log: YYLex.pm,v $
9 ## Revision 1.3 2003/01/11 00:50:20 daniel
10 ## Oops, forgor versions numbers for CPAN compatibility and added homepage url
11 ## in several places (all PODs and README)
12 ##
13 ## Revision 1.2 2003/01/10 22:30:54 daniel
14 ## version 0.3 (perl 5.6 and sablot 0.90)
15 ##
16 ## Revision 1.1.1.1 2002/11/24 17:18:15 daniel
17 ## initial checkin
18 ##
19 ##
20  
21 package XML::Sablotron::DOM::YYLex;
22 our $VERSION = '0.02';
23 use strict;
24 use XML::YYLex;
25 use vars qw(@ISA);
26 @ISA = qw(XML::YYLex);
27 use XML::Sablotron::DOM qw(:constants);
28  
29 sub _xml_getDocumentElement {
30 my $self = shift;
31 #return shift->documentElement
32 ## hm, sablotron 0.90 prefers this (the above line was written for 0.96)
33 return shift->getFirstChild;
34 }
35  
36 sub _xml_isTextNode {
37 my $self = shift;
38 my $node = shift;
39 return $node->getNodeType == TEXT_NODE;
40 }
41  
42 sub _xml_isElementNode {
43 my $self = shift;
44 my $node = shift;
45 return $node->getNodeType == ELEMENT_NODE;
46 }
47  
48 sub _xml_isDocumentNode {
49 my $self = shift;
50 my $node = shift;
51 return $node->getNodeType == DOCUMENT_NODE;
52 }
53  
54 1;
55  
56 =pod
57  
58 =head1 NAME
59  
60 XML::Sablotron::DOM::YYLex - Sablotron-specific part of C<XML::YYLex>
61  
62 =head1 SYNOPSIS
63  
64 use XML::YYLex;
65 my $parser = XML::YYLex::create_object( $xml_sablotron_dom_reference );
66  
67 =head1 DESCRIPTION
68  
69 This module implements the parts of C<XML::YYLex> that are specific to
70 the Sablotron module. Rather than interacting with this module directly
71 you create instances of it through the factory method C<create_object>
72 defined in C<XML::YYLex>.
73  
74 Please read the C<XML::YYLex> manpage for further info.
75  
76 =head1 SEE ALSO
77  
78 L<XML::YYLex>, L<XML::Sablotron::DOM>, L<XML::DOM::YYLex>
79  
80 The XML-YYLex homepage: http://home.debitel.net/user/boesswetter/xml_yylex/
81  
82 =cut