Skip to content

Commit ae2dd8a

Browse files
author
André L F S Bacci
committed
Infrastructure for individual entity files
1 parent e4e6ec6 commit ae2dd8a

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

scripts/entities.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function dump( string $filename , array $entities )
194194
function shouldInline( DOMDocument $dom ) : bool
195195
{
196196
// Pure text entities CANNOT be SYSTEMed (or libxml fails).
197-
// But entities that CONTAINS elements NEED to be SYSTEMed
197+
// But entities that CONTAINS elements need to be SYSTEMed
198198
// to avoid quotation madness.
199199

200200
// Why libxml/w3c? WHY?
@@ -204,15 +204,6 @@ function shouldInline( DOMDocument $dom ) : bool
204204
return ( $elems->length == 0 );
205205
}
206206

207-
function shouldInlineRecurse( DOMNode $node ) : bool
208-
{
209-
if ( $node->nodeType == XML_ELEMENT_NODE )
210-
return true;
211-
foreach ( $node->childNodes as $node )
212-
return shouldInlineRecurse( $node );
213-
214-
}
215-
216207
function verifyOverrides( bool $outputDetail )
217208
{
218209
global $entities;

scripts/split-ent.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,7 @@
8282
{
8383
$file = "$outdir/$name.$ext";
8484
file_put_contents( $file , $text );
85-
print "Generated $file\n";
8685
}
86+
87+
$total = count( $entities );
88+
print "Generated $total files.\n";

0 commit comments

Comments
 (0)