Skip to content

Commit ca42c6d

Browse files
author
Michael Cooper
committed
Include content from data-include in generated result
fixes #807
1 parent 4b72085 commit ca42c6d

7 files changed

Lines changed: 181 additions & 502 deletions

File tree

‎build.xml‎

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<delete file="${inputdir.techniques}/technique-associations.xml" failonerror="false"/>
4545
<delete file="output.html" failonerror="false"/>
4646
<delete dir="output" failonerror="false"/>
47+
<delete dir="input" failonerror="false"/>
4748
</target>
4849

4950
<target name="flatten" depends="init" description="Build a copy of guidelines with all data-include files incorporated">
@@ -181,16 +182,16 @@
181182
</target>
182183

183184
<!-- Understanding -->
184-
<target name="understanding" depends="guidelines-xml, techniques-list, understanding-index" description="Generate formatted Understanding docs">
185-
<makeurl file="${basedir}/understanding/" property="base.understanding"/>
185+
<target name="understanding" depends="guidelines-xml, techniques-list, understanding-index, understanding-flatten" description="Generate formatted Understanding docs">
186+
<makeurl file="${basedir}/input/understanding/" property="input.understanding"/>
186187
<mkdir dir="${basedir}/output/understanding/"/>
187188
<local name="output.dir"/>
188189
<makeurl file="${basedir}/output/understanding/" property="output.dir"/>
189190
<echo message="Outputting Understanding to ${output.dir}"/>
190191
<xslt in="${inputdir.guidelines}/wcag.xml" out="output.html" style="xslt/generate-understanding.xslt" force="true">
191192
<classpath path="${classpath.saxon}"/>
192193
<factory name="${xslt.factory}"/>
193-
<param name="base.dir" expression="${base.understanding}"/>
194+
<param name="base.dir" expression="${input.understanding}"/>
194195
<param name="output.dir" expression="${output.dir}"/>
195196
<param name="loc.guidelines" expression="https://www.w3.org/TR/WCAG21/" if="publication"/>
196197
<param name="loc.understanding" expression="https://www.w3.org/WAI/WCAG21/Understanding/" if="publication"/>
@@ -229,6 +230,20 @@
229230
</xslt>
230231
</target>
231232

233+
<target name="understanding-flatten" depends="guidelines-xml" description="Generate temp files for Understanding with includes included">
234+
<makeurl file="${basedir}/understanding/" property="base.understanding"/>
235+
<mkdir dir="${basedir}/input/understanding/"/>
236+
<local name="output.dir"/>
237+
<makeurl file="${basedir}/input/understanding/" property="output.dir"/>
238+
<xslt in="${inputdir.guidelines}/wcag.xml" out="output.html" style="xslt/flatten-understanding.xslt" force="true">
239+
<classpath path="${classpath.saxon}"/>
240+
<factory name="${xslt.factory}"/>
241+
<param name="base.dir" expression="${base.understanding}"/>
242+
<param name="output.dir" expression="${output.dir}"/>
243+
</xslt>
244+
245+
</target>
246+
232247
<!-- Publish -->
233248
<target name="deploy" depends="init, understanding-toc, techniques-toc" description="Generate content ready to deploy to gh-pages">
234249
<property name="editors" value="true"/>

‎understanding/21/seizures-and-physical-reactions.html‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
</head>
77
<body xmlns:wcag="https://www.w3.org/WAI/GL/">
88
<h1>Understanding Seizures</h1>
9-
<blockquote class="scquote" data-include="../../sc/20/seizures.html">SC text</blockquote>
10-
119

1210
<section id="intent">
1311
<h2>Intent of Seizures</h2>

‎understanding/conformance.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ <h3>Technical Definition of "Accessibility Support"</h3>
725725
be true for a technology:
726726
</p>
727727

728-
<blockquote class="scquote" data-include="../../terms/20/accessibility-supported.html">accessibility supported</blockquote>
728+
<blockquote class="scquote" data-include="../guidelines/terms/20/accessibility-supported.html">accessibility supported</blockquote>
729729

730730
</section>
731731

@@ -881,7 +881,7 @@ <h2>Understanding Conforming Alternate Versions</h2>
881881
alternative version is defined as:
882882
</p>
883883

884-
<blockquote class="scquote" data-include="../../terms/20/conforming-alternate-version.html">conforming alternate version</blockquote>
884+
<blockquote class="scquote" data-include="../guidelines/terms/20/conforming-alternate-version.html">conforming alternate version</blockquote>
885885

886886
<p>This ensures that all of the information and all of the functionality that is on the
887887
pages inside of the scope of conformance is available on conforming Web pages.
@@ -1172,7 +1172,7 @@ <h2>Understanding "Web Page"</h2>
11721172

11731173
<p>The definition of a Web Page is:</p>
11741174

1175-
<blockquote class="scquote" data-include="../../terms/20/web-page.html">web page</blockquote>
1175+
<blockquote class="scquote" data-include="../guidelines/terms/20/web-page.html">web page</blockquote>
11761176

11771177
<p>It is important to note that, in this standard, the term "Web page" includes much
11781178
more than static HTML pages. The term 'Web Page' was used in these guidelines to allow

0 commit comments

Comments
 (0)