Kate/Xslt.pm

filter: Statementstmt 40.0% 70 / 175 Branchbran 25.0% 30 / 120 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 57.8% 11 / 19 Podpod 0.0% 0 / 16 totaltotal 33.4% 112 / 335 SCAR 70.7
CC
62
Cov
34%
parsesqxpath
156.0
parsexpath
156.0
parsexattributes
56.0
CRAP 1172.5
« Kate/Convert/XMLData.pm ↑ Summary Kate/Verilog.pm »
1 # Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved.
2 # This program is free software; you can redistribute it and/or
3 # modify it under the same terms as Perl itself.
4  
5 # This file was generated from the 'xslt.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.03
9 #kate version 2.1
10 #kate author Peter Lammich (views@gmx.de)
11 #generated: Sun Feb 3 22:02:06 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::Xslt;
14  
15 1 our $VERSION = '0.14';
16  
17 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 sub new {
22 2 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
23 2 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
020
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
24 2 my $self = $class->SUPER::new(@_);
25 2 $self->attributes({
26 'Alert' => 'Alert',
27 'Attribute' => 'Others',
28 'Attribute Value' => 'BaseN',
29 'Comment' => 'Comment',
30 'Entity Reference' => 'Char',
31 'Invalid' => 'Error',
32 'Normal Text' => 'Normal',
33 'Tag' => 'Keyword',
34 'Variable' => 'Variable',
35 'XPath' => 'Others',
36 'XPath 2.0/ XSLT 2.0 Function' => 'Operator',
37 'XPath Attribute' => 'Float',
38 'XPath Axis' => 'DecVal',
39 'XPath String' => 'BaseN',
40 'XPath/ XSLT Function' => 'Function',
41 'XSLT 2.0 Tag' => 'Reserved',
42 'XSLT Tag' => 'Reserved',
43 });
44 2 $self->listAdd('functions',
45 'boolean',
46 'ceiling',
47 'concat',
48 'contains',
49 'count',
50 'current',
51 'document',
52 'element-available',
53 'false',
54 'floor',
55 'format-number',
56 'function-available',
57 'generate-id',
58 'id',
59 'key',
60 'lang',
61 'last',
62 'local-name',
63 'name',
64 'namespace-uri',
65 'normalize-space',
66 'not',
67 'number',
68 'position',
69 'round',
70 'starts-with',
71 'string',
72 'string-length',
73 'substring',
74 'substring-after',
75 'substring-before',
76 'sum',
77 'system-property',
78 'text',
79 'translate',
80 'true',
81 'unparsed-entity-uri',
82 );
83 2 $self->listAdd('functions_2.0',
84 'QName',
85 'abs',
86 'adjust-date-to-timezone',
87 'adjust-dateTime-to-timezone',
88 'adjust-time-to-timezone',
89 'avg',
90 'base-uri',
91 'codepoints-to-string',
92 'collection',
93 'compare',
94 'current-date',
95 'current-dateTime',
96 'current-group',
97 'current-grouping-key',
98 'current-time',
99 'data',
100 'dateTime',
101 'day-from-date',
102 'day-from-dateTime',
103 'days-from-duration',
104 'deep-equal',
105 'default-collation',
106 'distinct-values',
107 'doc',
108 'document-uri',
109 'empty',
110 'ends-with',
111 'error',
112 'escape-uri',
113 'exactly-one',
114 'exists',
115 'expanded-QName',
116 'format-date',
117 'format-dateTime',
118 'format-time',
119 'hours-from-dateTime',
120 'hours-from-duration',
121 'hours-from-time',
122 'idref',
123 'implicit-timezone',
124 'in-scope-prefixes',
125 'index-of',
126 'input',
127 'insert-before',
128 'local-name-from-QName',
129 'lower-case',
130 'matches',
131 'max',
132 'min',
133 'minutes-from-dateTime',
134 'minutes-from-duration',
135 'minutes-from-time',
136 'month-from-date',
137 'month-from-dateTime',
138 'months-from-duration',
139 'namespace-uri-for-prefix',
140 'namespace-uri-from-QName',
141 'node-kind',
142 'node-name',
143 'normalize-unicode',
144 'one-or-more',
145 'regex-group',
146 'remove',
147 'replace',
148 'resolve-QName',
149 'resolve-uri',
150 'reverse',
151 'root',
152 'round-half-to-even',
153 'seconds-from-dateTime',
154 'seconds-from-duration',
155 'seconds-from-time',
156 'sequence-node-identical',
157 'static-base-uri',
158 'string-join',
159 'string-to-codepoints',
160 'subsequence',
161 'subtract-dateTimes-yielding-dayTimeDuration',
162 'subtract-dateTimes-yielding-yearMonthDuration',
163 'subtract-dates-yielding-dayTimeDuration',
164 'subtract-dates-yielding-yearMonthDuration',
165 'timezone-from-date',
166 'timezone-from-dateTime',
167 'timezone-from-time',
168 'tokenize',
169 'trace',
170 'unordered',
171 'unparsed-entity-public-id',
172 'unparsed-text',
173 'upper-case',
174 'year-from-date',
175 'year-from-dateTime',
176 'years-from-duration',
177 'zero-or-one',
178 );
179 2 $self->listAdd('keytags',
180 'xsl:apply-imports',
181 'xsl:apply-templates',
182 'xsl:attribute',
183 'xsl:attribute-set',
184 'xsl:call-template',
185 'xsl:choose',
186 'xsl:comment',
187 'xsl:copy',
188 'xsl:copy-of',
189 'xsl:decimal-format',
190 'xsl:element',
191 'xsl:fallback',
192 'xsl:for-each',
193 'xsl:if',
194 'xsl:import',
195 'xsl:include',
196 'xsl:key',
197 'xsl:message',
198 'xsl:namespace-alias',
199 'xsl:number',
200 'xsl:otherwise',
201 'xsl:output',
202 'xsl:param',
203 'xsl:preserve-space',
204 'xsl:processing-instruction',
205 'xsl:sort',
206 'xsl:strip-space',
207 'xsl:stylesheet',
208 'xsl:template',
209 'xsl:text',
210 'xsl:transform',
211 'xsl:value-of',
212 'xsl:variable',
213 'xsl:when',
214 'xsl:with-param',
215 );
216 2 $self->listAdd('keytags_2.0',
217 'xsl:analyze-string',
218 'xsl:character-map',
219 'xsl:document',
220 'xsl:for-each-group',
221 'xsl:function',
222 'xsl:import-schema',
223 'xsl:matching-substring',
224 'xsl:namespace',
225 'xsl:next-match',
226 'xsl:non-matching-substring',
227 'xsl:output-character',
228 'xsl:perform-sort',
229 'xsl:result-document',
230 'xsl:sequence',
231 );
232 2 $self->contextdata({
233 'attrValue' => {
234 callback => \&parseattrValue,
235 attribute => 'Invalid',
236 },
237 'attributes' => {
238 callback => \&parseattributes,
239 attribute => 'Attribute',
240 },
241 'comment' => {
242 callback => \&parsecomment,
243 attribute => 'Comment',
244 },
245 'detectEntRef' => {
246 callback => \&parsedetectEntRef,
247 attribute => 'Normal Text',
248 },
249 'normalText' => {
250 callback => \&parsenormalText,
251 attribute => 'Normal Text',
252 },
253 'sqstring' => {
254 callback => \&parsesqstring,
255 attribute => 'Attribute Value',
256 },
257 'sqxpath' => {
258 callback => \&parsesqxpath,
259 attribute => 'XPath',
260 },
261 'sqxpathstring' => {
262 callback => \&parsesqxpathstring,
263 attribute => 'XPath String',
264 },
265 'string' => {
266 callback => \&parsestring,
267 attribute => 'Attribute Value',
268 },
269 'tagname' => {
270 callback => \&parsetagname,
271 attribute => 'Tag',
272 },
273 'xattrValue' => {
274 callback => \&parsexattrValue,
275 attribute => 'Invalid',
276 },
277 'xattributes' => {
278 callback => \&parsexattributes,
279 attribute => 'Attribute',
280 },
281 'xpath' => {
282 callback => \&parsexpath,
283 attribute => 'XPath',
284 },
285 'xpathstring' => {
286 callback => \&parsexpathstring,
287 attribute => 'XPath String',
288 },
289 });
290 2 $self->deliminators('\\s||\\.|\\(|\\)|\\!|\\+|,|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|-|:');
291 2 $self->basecontext('normalText');
292 2 $self->keywordscase(0);
293 2 $self->initialize;
294 2 bless ($self, $class);
295 2 return $self;
296 }
297  
298 sub language {
299 0 ▶ return 'xslt';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
300 }
301  
302 sub parseattrValue {
303 100 ▶ my ($self, $text) = @_;
Subroutine parseattrValue: called CC=5 SCAR=22.3
Pod undocumented
304 # attribute => 'Invalid'
305 # char => '/'
306 # char1 => '>'
307 # context => '#pop#pop#pop'
308 # type => 'Detect2Chars'
309 100 ▶ if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Invalid')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", ">", 0, 0, 0, undef, 0, "#pop#pop#pop", "Invalid")) 0 100 100
310 0 return 1
311 }
312 # attribute => 'Invalid'
313 # char => '>'
314 # context => '#pop#pop#pop'
315 # type => 'DetectChar'
316 100 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Invalid')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "#pop#pop#pop", "Invalid")) 0 100 100
317 0 return 1
318 }
319 # attribute => 'Attribute Value'
320 # char => '"'
321 # context => 'string'
322 # type => 'DetectChar'
323 100 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'Attribute Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "string", "Attribute Value")) 100 0 100
324 100 return 1
325 }
326 # attribute => 'Attribute Value'
327 # char => '''
328 # context => 'sqstring'
329 # type => 'DetectChar'
330 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'sqstring', 'Attribute Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "sqstring", "Attribute Value")) 0 0 0
331 0 return 1
332 }
333 0 return 0;
334 };
335  
336 sub parseattributes {
337 774 ▶ my ($self, $text) = @_;
Subroutine parseattributes: called CC=4 SCAR=13.9
Pod undocumented
338 # attribute => 'Tag'
339 # char => '/'
340 # char1 => '>'
341 # context => '#pop#pop'
342 # type => 'Detect2Chars'
343 774 ▶ if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop#pop', 'Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", ">", 0, 0, 0, undef, 0, "#pop#pop", "Tag")) 38 736 774
344 38 return 1
345 }
346 # attribute => 'Tag'
347 # char => '>'
348 # context => '#pop#pop'
349 # type => 'DetectChar'
350 736 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop', 'Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "#pop#pop", "Tag")) 36 700 736
351 36 return 1
352 }
353 # String => '\s*=\s*'
354 # attribute => 'Normal Text'
355 # context => 'attrValue'
356 # type => 'RegExpr'
357 700 ▶ if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'attrValue', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s*=\\s*", 0, 0, 0, undef, 0, "attrValue", "Normal Text")) 100 600 700
358 100 return 1
359 }
360 600 return 0;
361 };
362  
363 sub parsecomment {
364 710 ▶ my ($self, $text) = @_;
Subroutine parsecomment: called CC=4 SCAR=14.0
Pod undocumented
365 # String => '-->'
366 # attribute => 'Comment'
367 # context => '#pop'
368 # endRegion => 'comment'
369 # type => 'StringDetect'
370 710 ▶ if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "-->", 0, 0, 0, undef, 0, "#pop", "Comment")) 10 700 710
371 10 return 1
372 }
373 # String => '-(-(?!->))+'
374 # attribute => 'Invalid'
375 # context => '#stay'
376 # type => 'RegExpr'
377 700 ▶ if ($self->testRegExpr($text, '-(-(?!->))+', 0, 0, 0, undef, 0, '#stay', 'Invalid')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "-(-(?!->))+", 0, 0, 0, undef, 0, "#stay", "Invalid")) 0 700 700
378 0 return 1
379 }
380 # String => '(FIXME|TODO|HACK)'
381 # attribute => 'Alert'
382 # context => '#stay'
383 # type => 'RegExpr'
384 700 ▶ if ($self->testRegExpr($text, '(FIXME|TODO|HACK)', 0, 0, 0, undef, 0, '#stay', 'Alert')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(FIXME|TODO|HACK)", 0, 0, 0, undef, 0, "#stay", "Alert")) 2 698 700
385 2 return 1
386 }
387 698 return 0;
388 };
389  
390 sub parsedetectEntRef {
391 1860 ▶ my ($self, $text) = @_;
Subroutine parsedetectEntRef: called CC=2 SCAR=7.6
Pod undocumented
392 # String => '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\w.:_-]*);'
393 # attribute => 'Entity Reference'
394 # context => '#stay'
395 # type => 'RegExpr'
396 1860 ▶ if ($self->testRegExpr($text, '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);', 0, 0, 0, undef, 0, '#stay', 'Entity Reference')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);", 0, 0, 0, undef, 0, "#stay", "Entity Reference")) 0 1860 1860
397 0 return 1
398 }
399 1860 return 0;
400 };
401  
402 sub parsenormalText {
403 852 ▶ my ($self, $text) = @_;
Subroutine parsenormalText: called CC=4 SCAR=14.0
Pod undocumented
404 # String => '<!--'
405 # attribute => 'Comment'
406 # beginRegion => 'comment'
407 # context => 'comment'
408 # type => 'StringDetect'
409 852 ▶ if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<!--", 0, 0, 0, undef, 0, "comment", "Comment")) 10 842 852
410 10 return 1
411 }
412 # attribute => 'Tag'
413 # char => '<'
414 # context => 'tagname'
415 # type => 'DetectChar'
416 842 ▶ if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'tagname', 'Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "<", 0, 0, 0, undef, 0, "tagname", "Tag")) 176 666 842
417 176 return 1
418 }
419 # String => '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\w.:_-]*);'
420 # attribute => 'Entity Reference'
421 # context => '#stay'
422 # type => 'RegExpr'
423 666 ▶ if ($self->testRegExpr($text, '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);', 0, 0, 0, undef, 0, '#stay', 'Entity Reference')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);", 0, 0, 0, undef, 0, "#stay", "Entity Reference")) 0 666 666
424 0 return 1
425 }
426 666 return 0;
427 };
428  
429 sub parsesqstring {
430 0 ▶ my ($self, $text) = @_;
Subroutine parsesqstring: not called CC=4 SCAR=30.0
Pod undocumented
431 # attribute => 'XPath'
432 # char => '{'
433 # context => 'sqxpath'
434 # type => 'DetectChar'
435 0 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'sqxpath', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "sqxpath", "XPath")) 0 0 0
436 0 return 1
437 }
438 # attribute => 'Attribute Value'
439 # char => '''
440 # context => '#pop#pop'
441 # type => 'DetectChar'
442 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'Attribute Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop#pop", "Attribute Value")) 0 0 0
443 0 return 1
444 }
445 # context => 'detectEntRef'
446 # type => 'IncludeRules'
447 0 ▶ if ($self->includeRules('detectEntRef', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("detectEntRef", $text)) 0 0 0
448 0 return 1
449 }
450 0 return 0;
451 };
452  
453 sub parsesqxpath {
454 0 ▶ my ($self, $text) = @_;
Subroutine parsesqxpath: not called CC=12 SCAR=50.5
Pod undocumented
455 # String => 'functions'
456 # attribute => 'XPath/ XSLT Function'
457 # context => '#stay'
458 # type => 'keyword'
459 0 ▶ if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'XPath/ XSLT Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "functions", 0, undef, 0, "#stay", "XPath/ XSLT Function")) 0 0 0
460 0 return 1
461 }
462 # String => 'functions_2.0'
463 # attribute => 'XPath 2.0/ XSLT 2.0 Function'
464 # context => '#stay'
465 # type => 'keyword'
466 0 ▶ if ($self->testKeyword($text, 'functions_2.0', 0, undef, 0, '#stay', 'XPath 2.0/ XSLT 2.0 Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "functions_2.0", 0, undef, 0, "#stay", "XPath 2.0/ XSLT 2.0 Function")) 0 0 0
467 0 return 1
468 }
469 # String => '(ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self)::'
470 # attribute => 'XPath Axis'
471 # context => '#stay'
472 # type => 'RegExpr'
473 0 ▶ if ($self->testRegExpr($text, '(ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self)::', 0, 0, 0, undef, 0, '#stay', 'XPath Axis')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self)::", 0, 0, 0, undef, 0, "#stay", "XPath Axis")) 0 0 0
474 0 return 1
475 }
476 # attribute => 'XPath'
477 # char => '}'
478 # context => '#pop'
479 # type => 'DetectChar'
480 0 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#pop", "XPath")) 0 0 0
481 0 return 1
482 }
483 # attribute => 'XPath String'
484 # char => '"'
485 # context => 'xpathstring'
486 # type => 'DetectChar'
487 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'xpathstring', 'XPath String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "xpathstring", "XPath String")) 0 0 0
488 0 return 1
489 }
490 # attribute => 'XPath'
491 # char => '''
492 # context => '#pop#pop'
493 # type => 'DetectChar'
494 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop#pop", "XPath")) 0 0 0
495 0 return 1
496 }
497 # String => '@[A-Za-z_:][\w.:_-]*'
498 # attribute => 'XPath Attribute'
499 # context => '#stay'
500 # type => 'RegExpr'
501 0 ▶ if ($self->testRegExpr($text, '@[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, '#stay', 'XPath Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\@[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "#stay", "XPath Attribute")) 0 0 0
502 0 return 1
503 }
504 # String => '\$[A-Za-z_:][\w.:_-]*'
505 # attribute => 'Variable'
506 # context => '#stay'
507 # type => 'RegExpr'
508 0 ▶ if ($self->testRegExpr($text, '\\$[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, '#stay', 'Variable')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "#stay", "Variable")) 0 0 0
509 0 return 1
510 }
511 # String => '[A-Za-z_:][\w.:_-]*'
512 # attribute => 'XPath'
513 # context => '#stay'
514 # type => 'RegExpr'
515 0 ▶ if ($self->testRegExpr($text, '[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, '#stay', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "#stay", "XPath")) 0 0 0
516 0 return 1
517 }
518 # attribute => 'Invalid'
519 # char => '$'
520 # context => '#stay'
521 # type => 'DetectChar'
522 0 ▶ if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#stay', 'Invalid')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\$", 0, 0, 0, undef, 0, "#stay", "Invalid")) 0 0 0
523 0 return 1
524 }
525 # context => 'detectEntRef'
526 # type => 'IncludeRules'
527 0 ▶ if ($self->includeRules('detectEntRef', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("detectEntRef", $text)) 0 0 0
528 0 return 1
529 }
530 0 return 0;
531 };
532  
533 sub parsesqxpathstring {
534 0 ▶ my ($self, $text) = @_;
Subroutine parsesqxpathstring: not called CC=3 SCAR=24.8
Pod undocumented
535 # attribute => 'XPath String'
536 # char => '''
537 # context => '#pop'
538 # type => 'DetectChar'
539 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'XPath String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop", "XPath String")) 0 0 0
540 0 return 1
541 }
542 # context => 'detectEntRef'
543 # type => 'IncludeRules'
544 0 ▶ if ($self->includeRules('detectEntRef', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("detectEntRef", $text)) 0 0 0
545 0 return 1
546 }
547 0 return 0;
548 };
549  
550 sub parsestring {
551 1960 ▶ my ($self, $text) = @_;
Subroutine parsestring: called CC=4 SCAR=14.8
Pod undocumented
552 # attribute => 'XPath'
553 # char => '{'
554 # context => 'xpath'
555 # type => 'DetectChar'
556 1960 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'xpath', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "xpath", "XPath")) 0 1960 1960
557 0 return 1
558 }
559 # attribute => 'Attribute Value'
560 # char => '"'
561 # context => '#pop#pop'
562 # type => 'DetectChar'
563 1960 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop', 'Attribute Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "#pop#pop", "Attribute Value")) 100 1860 1960
564 100 return 1
565 }
566 # context => 'detectEntRef'
567 # type => 'IncludeRules'
568 1860 ▶ if ($self->includeRules('detectEntRef', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("detectEntRef", $text)) 0 1860 1860
569 0 return 1
570 }
571 1860 return 0;
572 };
573  
574 sub parsetagname {
575 2036 ▶ my ($self, $text) = @_;
Subroutine parsetagname: called CC=5 SCAR=16.6
Pod undocumented
576 # String => 'keytags'
577 # attribute => 'XSLT Tag'
578 # context => 'xattributes'
579 # type => 'keyword'
580 2036 ▶ if ($self->testKeyword($text, 'keytags', 0, undef, 0, 'xattributes', 'XSLT Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "keytags", 0, undef, 0, "xattributes", "XSLT Tag")) 0 2036 2036
581 0 return 1
582 }
583 # String => 'keytags_2.0'
584 # attribute => 'XSLT 2.0 Tag'
585 # context => 'xattributes'
586 # type => 'keyword'
587 2036 ▶ if ($self->testKeyword($text, 'keytags_2.0', 0, undef, 0, 'xattributes', 'XSLT 2.0 Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "keytags_2.0", 0, undef, 0, "xattributes", "XSLT 2.0 Tag")) 0 2036 2036
588 0 return 1
589 }
590 # String => '\s*'
591 # attribute => 'Attribute'
592 # context => 'attributes'
593 # type => 'RegExpr'
594 2036 ▶ if ($self->testRegExpr($text, '\\s*', 0, 0, 0, undef, 0, 'attributes', 'Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s*", 0, 0, 0, undef, 0, "attributes", "Attribute")) 74 1962 2036
595 74 return 1
596 }
597 # attribute => 'Tag'
598 # char => '>'
599 # context => '#pop'
600 # type => 'DetectChar'
601 1962 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "#pop", "Tag")) 102 1860 1962
602 102 return 1
603 }
604 1860 return 0;
605 };
606  
607 sub parsexattrValue {
608 0 ▶ my ($self, $text) = @_;
Subroutine parsexattrValue: not called CC=5 SCAR=34.0
Pod undocumented
609 # attribute => 'Invalid'
610 # char => '/'
611 # char1 => '>'
612 # context => '#pop#pop#pop'
613 # type => 'Detect2Chars'
614 0 ▶ if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Invalid')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", ">", 0, 0, 0, undef, 0, "#pop#pop#pop", "Invalid")) 0 0 0
615 0 return 1
616 }
617 # attribute => 'Invalid'
618 # char => '>'
619 # context => '#pop#pop#pop'
620 # type => 'DetectChar'
621 0 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Invalid')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "#pop#pop#pop", "Invalid")) 0 0 0
622 0 return 1
623 }
624 # attribute => 'XPath'
625 # char => '"'
626 # context => 'xpath'
627 # type => 'DetectChar'
628 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'xpath', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "xpath", "XPath")) 0 0 0
629 0 return 1
630 }
631 # attribute => 'XPath'
632 # char => '''
633 # context => 'sqxpath'
634 # type => 'DetectChar'
635 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'sqxpath', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "sqxpath", "XPath")) 0 0 0
636 0 return 1
637 }
638 0 return 0;
639 };
640  
641 sub parsexattributes {
642 0 ▶ my ($self, $text) = @_;
Subroutine parsexattributes: not called CC=7 SCAR=40.3
Pod undocumented
643 # attribute => 'Tag'
644 # char => '/'
645 # char1 => '>'
646 # context => '#pop#pop'
647 # type => 'Detect2Chars'
648 0 ▶ if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop#pop', 'Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", ">", 0, 0, 0, undef, 0, "#pop#pop", "Tag")) 0 0 0
649 0 return 1
650 }
651 # attribute => 'Tag'
652 # char => '>'
653 # context => '#pop#pop'
654 # type => 'DetectChar'
655 0 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop', 'Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "#pop#pop", "Tag")) 0 0 0
656 0 return 1
657 }
658 # String => 'select\s*=\s*'
659 # attribute => 'Attribute'
660 # context => 'xattrValue'
661 # type => 'RegExpr'
662 0 ▶ if ($self->testRegExpr($text, 'select\\s*=\\s*', 0, 0, 0, undef, 0, 'xattrValue', 'Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "select\\s*=\\s*", 0, 0, 0, undef, 0, "xattrValue", "Attribute")) 0 0 0
663 0 return 1
664 }
665 # String => 'test\s*=\s*'
666 # attribute => 'Attribute'
667 # context => 'xattrValue'
668 # type => 'RegExpr'
669 0 ▶ if ($self->testRegExpr($text, 'test\\s*=\\s*', 0, 0, 0, undef, 0, 'xattrValue', 'Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "test\\s*=\\s*", 0, 0, 0, undef, 0, "xattrValue", "Attribute")) 0 0 0
670 0 return 1
671 }
672 # String => 'match\s*=\s*'
673 # attribute => 'Attribute'
674 # context => 'xattrValue'
675 # type => 'RegExpr'
676 0 ▶ if ($self->testRegExpr($text, 'match\\s*=\\s*', 0, 0, 0, undef, 0, 'xattrValue', 'Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "match\\s*=\\s*", 0, 0, 0, undef, 0, "xattrValue", "Attribute")) 0 0 0
677 0 return 1
678 }
679 # String => '\s*=\s*'
680 # attribute => 'Attribute'
681 # context => 'attrValue'
682 # type => 'RegExpr'
683 0 ▶ if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'attrValue', 'Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s*=\\s*", 0, 0, 0, undef, 0, "attrValue", "Attribute")) 0 0 0
684 0 return 1
685 }
686 0 return 0;
687 };
688  
689 sub parsexpath {
690 0 ▶ my ($self, $text) = @_;
Subroutine parsexpath: not called CC=12 SCAR=50.5
Pod undocumented
691 # String => 'functions'
692 # attribute => 'XPath/ XSLT Function'
693 # context => '#stay'
694 # type => 'keyword'
695 0 ▶ if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'XPath/ XSLT Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "functions", 0, undef, 0, "#stay", "XPath/ XSLT Function")) 0 0 0
696 0 return 1
697 }
698 # String => 'functions_2.0'
699 # attribute => 'XPath 2.0/ XSLT 2.0 Function'
700 # context => '#stay'
701 # type => 'keyword'
702 0 ▶ if ($self->testKeyword($text, 'functions_2.0', 0, undef, 0, '#stay', 'XPath 2.0/ XSLT 2.0 Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "functions_2.0", 0, undef, 0, "#stay", "XPath 2.0/ XSLT 2.0 Function")) 0 0 0
703 0 return 1
704 }
705 # String => '(ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self)::'
706 # attribute => 'XPath Axis'
707 # context => '#stay'
708 # type => 'RegExpr'
709 0 ▶ if ($self->testRegExpr($text, '(ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self)::', 0, 0, 0, undef, 0, '#stay', 'XPath Axis')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self)::", 0, 0, 0, undef, 0, "#stay", "XPath Axis")) 0 0 0
710 0 return 1
711 }
712 # attribute => 'XPath'
713 # char => '}'
714 # context => '#pop'
715 # type => 'DetectChar'
716 0 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#pop", "XPath")) 0 0 0
717 0 return 1
718 }
719 # attribute => 'XPath String'
720 # char => '''
721 # context => 'sqxpathstring'
722 # type => 'DetectChar'
723 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'sqxpathstring', 'XPath String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "sqxpathstring", "XPath String")) 0 0 0
724 0 return 1
725 }
726 # attribute => 'XPath'
727 # char => '"'
728 # context => '#pop#pop'
729 # type => 'DetectChar'
730 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "#pop#pop", "XPath")) 0 0 0
731 0 return 1
732 }
733 # String => '@[A-Za-z_:][\w.:_-]*'
734 # attribute => 'XPath Attribute'
735 # context => '#stay'
736 # type => 'RegExpr'
737 0 ▶ if ($self->testRegExpr($text, '@[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, '#stay', 'XPath Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\@[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "#stay", "XPath Attribute")) 0 0 0
738 0 return 1
739 }
740 # String => '\$[A-Za-z_:][\w.:_-]*'
741 # attribute => 'Variable'
742 # context => '#stay'
743 # type => 'RegExpr'
744 0 ▶ if ($self->testRegExpr($text, '\\$[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, '#stay', 'Variable')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "#stay", "Variable")) 0 0 0
745 0 return 1
746 }
747 # String => '[A-Za-z_:][\w.:_-]*'
748 # attribute => 'XPath'
749 # context => '#stay'
750 # type => 'RegExpr'
751 0 ▶ if ($self->testRegExpr($text, '[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, '#stay', 'XPath')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "#stay", "XPath")) 0 0 0
752 0 return 1
753 }
754 # attribute => 'Invalid'
755 # char => '$'
756 # context => '#stay'
757 # type => 'DetectChar'
758 0 ▶ if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#stay', 'Invalid')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\$", 0, 0, 0, undef, 0, "#stay", "Invalid")) 0 0 0
759 0 return 1
760 }
761 # context => 'detectEntRef'
762 # type => 'IncludeRules'
763 0 ▶ if ($self->includeRules('detectEntRef', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("detectEntRef", $text)) 0 0 0
764 0 return 1
765 }
766 0 return 0;
767 };
768  
769 sub parsexpathstring {
770 0 ▶ my ($self, $text) = @_;
Subroutine parsexpathstring: not called CC=3 SCAR=24.8
Pod undocumented
771 # attribute => 'XPath String'
772 # char => '"'
773 # context => '#pop'
774 # type => 'DetectChar'
775 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'XPath String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "#pop", "XPath String")) 0 0 0
776 0 return 1
777 }
778 # context => 'detectEntRef'
779 # type => 'IncludeRules'
780 0 ▶ if ($self->includeRules('detectEntRef', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("detectEntRef", $text)) 0 0 0
781 0 return 1
782 }
783 0 return 0;
784 };
785  
786  
787 1 1;
788  
789 __END__
« Kate/Convert/XMLData.pm ↑ Summary Kate/Verilog.pm »