summaryrefslogtreecommitdiff
path: root/build/preseed.pl
diff options
context:
space:
mode:
authorFrans Pop <elendil@planet.nl>2005-11-25 12:09:57 +0000
committerFrans Pop <elendil@planet.nl>2005-11-25 12:09:57 +0000
commitf8b2b97891b9d50649845c4f0beb251ae0f8be99 (patch)
tree641700136c13f73d77c0278d1793d0198f68c8a0 /build/preseed.pl
parent6f64080a095c257d780b1feac41a352ac7134723 (diff)
downloadinstallation-guide-f8b2b97891b9d50649845c4f0beb251ae0f8be99.zip
Only include examples that have an attribute 'role' set
Diffstat (limited to 'build/preseed.pl')
-rwxr-xr-xbuild/preseed.pl14
1 files changed, 8 insertions, 6 deletions
diff --git a/build/preseed.pl b/build/preseed.pl
index 352acb72d..372585c75 100755
--- a/build/preseed.pl
+++ b/build/preseed.pl
@@ -3,10 +3,10 @@
# Script parses the XML file for the appendix on preseeding and extracts
# example snippts to form the raw preseed example file. Section titles are
# added as headers.
-# The script will include all text between <informalexample> tags, except
-# if a 'condition' attribute is in force that does not match the specified
-# release or if an 'arch' attribute is in force that does not match the
-# specified architecture.
+# The script will include all text between <informalexample> tags that have
+# the attribute 'role="example"' set, except if a 'condition' attribute is
+# in force that does not match the specified release or if an 'arch' attribute
+# is in force that does not match the specified architecture.
# Define module to use
use HTML::Parser();
@@ -97,8 +97,10 @@ sub start_rtn {
}
$prevtag = $tagname;
if ( $tagname eq 'informalexample' && ! exists $ignore{'tag'} ) {
- $example{'print'} = 1;
- $example{'new'} = 1;
+ if ( exists $attr->{role} && $attr->{role} eq "example" ) {
+ $example{'print'} = 1;
+ $example{'new'} = 1;
+ }
}
}