diff options
author | Frans Pop <elendil@planet.nl> | 2005-11-25 12:09:57 +0000 |
---|---|---|
committer | Frans Pop <elendil@planet.nl> | 2005-11-25 12:09:57 +0000 |
commit | f8b2b97891b9d50649845c4f0beb251ae0f8be99 (patch) | |
tree | 641700136c13f73d77c0278d1793d0198f68c8a0 /build | |
parent | 6f64080a095c257d780b1feac41a352ac7134723 (diff) | |
download | installation-guide-f8b2b97891b9d50649845c4f0beb251ae0f8be99.zip |
Only include examples that have an attribute 'role' set
Diffstat (limited to 'build')
-rwxr-xr-x | build/preseed.pl | 14 |
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; + } } } |