You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by mb...@apache.org on 2019/11/07 20:07:25 UTC

[incubator-daffodil] branch master updated: Improved tutorials content.

This is an automated email from the ASF dual-hosted git repository.

mbeckerle pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-daffodil.git


The following commit(s) were added to refs/heads/master by this push:
     new 400aff3  Improved tutorials content.
400aff3 is described below

commit 400aff38529f5daf432e5436dd1a1ea747e6fc54
Author: Michael Beckerle <mb...@tresys.com>
AuthorDate: Wed Nov 6 20:42:22 2019 -0500

    Improved tutorials content.
    
    Web security reasons make it better to eliminate file includes.
    
    A variety of cross-site security provisions that are the default these
    days make it impossible for a TDML file to reference a stylesheet that
    is on a different web server.
    
    That makes maintaining these things far too tedious. So the XSL
    stylesheet lives alongside the tutorial files and is included by
    relative URI path.
    
    Unfortunately, this means there is some duplication between the
    templates used in the daffodil-site jekyll configuration, and this XSLT
    stylesheet for the tutorials.
    
    I don't know how to fix that when html doesn't have a first-class
    include capability.
    
    The way this is done now you can view a TDML tutorial from a file:///
    style URL and it presents properly.
    
    DAFFODIL-2004
---
 .../src/main/resources/DFDLTutorialStylesheet.xsl  | 283 +++++++++++++++++++++
 .../src/main/resources/bitorder.tutorial.tdml.xml  |   2 +-
 .../src/main/resources/bugReportTemplate.tdml.xml  |   2 +-
 .../exampleTDMLTutorial.tutorial.tdml.xml          | 185 --------------
 tutorials/src/main/resources/tdmlTutorial.tdml.xml |   2 +-
 .../apache/daffodil/tutorials/TestTutorials.scala  |   5 -
 6 files changed, 286 insertions(+), 193 deletions(-)

diff --git a/tutorials/src/main/resources/DFDLTutorialStylesheet.xsl b/tutorials/src/main/resources/DFDLTutorialStylesheet.xsl
new file mode 100644
index 0000000..f608bbd
--- /dev/null
+++ b/tutorials/src/main/resources/DFDLTutorialStylesheet.xsl
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData" 
+  xmlns="http://www.w3.org/1999/xhtml">
+
+  <xsl:output method="html" doctype-system="about:legacy-compat"/>
+      
+  <xsl:template match="tdml:tutorial">
+    <p>
+      <xsl:copy-of select="."/>  <!-- Needs to be copy-of to preserve the html -->
+    </p>
+  </xsl:template>
+  
+ <xsl:template match="tdml:testSuite/tdml:parserTestCase[@tdml:tutorialInclude='no']"/>
+  <xsl:template match="tdml:testSuite/tdml:parserTestCase[not(@tdml:tutorialInclude)]">
+       <h2>Parse Test: <xsl:value-of select="@name"/></h2>
+    <p><xsl:value-of select="@description"/></p>
+    <xsl:apply-templates select="*"/>
+  </xsl:template>
+  
+  <xsl:template match="tdml:testSuite/tdml:unparserTestCase[@tdml:tutorialInclude='no']"/>
+  <xsl:template match="tdml:testSuite/tdml:unparserTestCase[not(@tdml:tutorialInclude)]">
+    <h2>Unparse Test: <xsl:value-of select="@name"/></h2>
+    <p><xsl:value-of select="@description"/></p>
+    <xsl:apply-templates select="*"/>
+  </xsl:template>
+  
+  <xsl:template match="tdml:document[@tdml:tutorialInclude='no']"/>
+  <xsl:template match="tdml:document[not(@tdml:tutorialInclude)]">
+    <xsl:variable name="nodestring">
+      <xsl:apply-templates select="../tdml:document" mode="serialize"/>
+    </xsl:variable>
+    <b>Data Stream:</b>
+    <table>
+      <tr>
+        <td>
+        <pre class="prettyprint linenums">
+          <xsl:value-of select="$nodestring"/>
+         </pre>
+        </td>
+      </tr>
+    </table>
+  </xsl:template>
+  
+  <xsl:template match="tdml:infoset[@tdml:tutorialInclude='no']"/>
+  <xsl:template match="tdml:infoset[not(@tdml:tutorialInclude)]">
+    <xsl:variable name="nodestring">
+      <xsl:apply-templates select="./tdml:dfdlInfoset/*" mode="serialize"/>
+    </xsl:variable>
+    <b>Infoset:</b>
+    <table>
+      <tr>
+        <td>
+          <pre class="prettyprint linenums">
+            <xsl:value-of select="$nodestring"/>
+          </pre>
+        </td>
+      </tr>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="*" mode="serialize">
+    <xsl:text>&lt;</xsl:text>
+    <xsl:value-of select="name()"/>
+    <xsl:apply-templates select="@*" mode="serialize"/>
+    <xsl:choose>
+      <xsl:when test="node()">
+        <xsl:text>&gt;</xsl:text>
+        <xsl:apply-templates mode="serialize"/>
+        <xsl:text>&lt;/</xsl:text>
+        <xsl:value-of select="name()"/>
+        <xsl:text>&gt;</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text> /&gt;</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+  <xsl:template match="@*" mode="serialize">
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="name()"/>
+    <xsl:text>="</xsl:text>
+    <xsl:value-of select="."/>
+    <xsl:text>"</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="text()" mode="serialize">
+    <xsl:value-of select="."/>
+  </xsl:template>
+
+<!-- These match nodes containing the don't include in tutorial indicator, and 
+     also, all-whitespace nodes that precede them. -->
+     
+ <xsl:template mode="serialize"  match="text()[string-length(translate(., ' &#9;&#xA;&#xD;', '')) = 0 and
+    following-sibling::node()[1][@tdml:tutorialInclude='no']]"/>
+
+  <xsl:template mode="serialize"  match="node()[@tdml:tutorialInclude='no']"/>
+  
+  <xsl:template match="tdml:testSuite/tdml:defineSchema[@tdml:tutorialInclude='no']"/>
+ 
+  <xsl:template match="tdml:testSuite/tdml:defineSchema[not(@tdml:tutorialInclude)]">
+    <xsl:variable name="nodestring">
+      <xsl:apply-templates select="node()" mode="serialize"/>
+    </xsl:variable>
+    <b>DFDL Schema:</b>
+    <table>
+      <tr>
+        <td>
+          <pre class="prettyprint linenums">
+            <xsl:value-of select="$nodestring"/>
+          </pre>
+        </td>
+      </tr>
+    </table>
+    <br/>
+  </xsl:template>
+  
+
+  <xsl:template match="/">
+    <html>
+    <head>
+    <meta charset="utf-8"/>
+    <title><xsl:value-of select="tdml:testSuite/@suiteName"/></title>
+    <!-- Enable responsive viewport -->
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <link href="https://daffodil.apache.org/assets/themes/apache/bootstrap/css/bootstrap.css" rel="stylesheet"/>
+    <link href="https://daffodil.apache.org/assets/themes/apache/css/style.css?body=1" rel="stylesheet" type="text/css"/>
+    <link href="https://daffodil.apache.org/assets/themes/apache/css/syntax.css" rel="stylesheet"  type="text/css" media="screen" />
+    <!-- 
+      This li.L0, li.L1 etc. is about turning on line numbering for all lines. 
+      The default was to put a line number only every 5 lines. 
+      -->
+    <style>
+          li.L0, li.L1, li.L2, li.L3,
+          li.L5, li.L6, li.L7, li.L8
+          { list-style-type: decimal !important }
+          li.L0,
+          li.L2,
+          li.L4,
+          li.L6,
+          li.L8 { background: #f5f5f5 }
+    </style>
+    </head>
+    <body id="main">
+   <div class="navbar navbar-inverse" role="navigation">
+      <div class="container">
+        <div class="navbar-header"><a class="navbar-brand" href="/"><img src="https://daffodil.apache.org/assets/themes/apache/img/apache-daffodil-logo.png" alt="Apache Daffodil"/></a></div>
+        <nav role="navigation">
+          <ul class="nav navbar-nav navbar-right">
+            <li><a href="https://daffodil.apache.org/releases">Releases</a></li>
+            <li id="documentation">
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a>
+              <ul class="dropdown-menu dropdown-left">
+                <li><a href="https://daffodil.apache.org/getting-started/">Getting Started</a></li>
+                <li><a href="https://daffodil.apache.org/examples/">Examples</a></li>
+                <li><a href="https://daffodil.apache.org/docs/latest/javadoc/">Java API</a></li>
+                <li><a href="https://daffodil.apache.org/docs/latest/scaladoc/">Scala API</a></li>
+                <li><a href="https://daffodil.apache.org/docs/dfdl/">DFDL Specification</a></li>
+                <li><a href="https://daffodil.apache.org/unsupported/">Unsupported Features</a></li>
+                <li><a href="https://daffodil.apache.org/faq/">Frequently Asked Questions</a></li>
+              </ul>
+            </li>
+            <li id="community">
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a>
+              <ul class="dropdown-menu dropdown-left">
+                <li><a href="https://daffodil.apache.org/community">Get Involved</a></li>
+                <li><a href="https://daffodil.apache.org/people">People</a></li>
+              </ul>
+            </li>
+            <li id="development">
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Development<b class="caret"></b></a>
+              <ul class="dropdown-menu dropdown-left">
+                <li><a class="external" href="https://cwiki.apache.org/confluence/display/DAFFODIL/">Wiki</a></li>
+                <li><a class="external" href="https://github.com/search?q=repo%3Aapache%2Fincubator-daffodil+repo%3Aapache%2Fincubator-daffodil-site&amp;type=Repositories">GitHub</a></li>
+                <li><a class="external" href="https://issues.apache.org/jira/projects/DAFFODIL/">JIRA</a></li>
+              </ul>
+            </li>
+            <li id="apache">
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Apache<b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <li><a class="external" href="https://www.apache.org/">Apache Software Foundation</a></li>
+                <li><a class="external" href="https://www.apache.org/licenses/">License</a></li>
+                <li><a class="external" href="https://www.apache.org/security">Security</a></li>
+                <li><a class="external" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+                <li><a class="external" href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
+              </ul>
+            </li>
+          </ul>
+        </nav>
+      </div>
+    </div>
+        <div class="title">
+          <div class="container">
+            <h2><xsl:value-of select="tdml:testSuite/@suiteName"/></h2>
+          </div>
+        </div>
+        <div class="container">
+          <div class="row">
+            <div class="col-md-12">
+              <section>
+                <xsl:apply-templates select="*"/>
+              </section>
+            </div>
+          </div>
+          <footer class="pt-footer">
+   <footer class="site-footer">
+    <div class="wrapper">
+        <div class="footer-col-wrapper" style="font-size: .85em;">
+            <hr/>
+            <div class="container">
+              <div class="col-xs-9">
+                <div class="alert alert-warning">
+                  This tutorial is runnable as a TDML Test file. 
+                  Learn more about 
+                  <a href="https://daffodil.apache.org/assets/tutorials/aboutTDMLTutorials">TDML Tutorials here</a>
+                </div>
+              </div>
+            </div>
+        </div>
+    </div>
+</footer>
+  <footer class="site-footer">
+    <div class="wrapper">
+        <div class="footer-col-wrapper" style="font-size: .85em;">
+            <hr/>
+            <div class="container">
+                <div class="row">
+                    <div class="col-xs-3" style="margin-top: 15px;">
+                        <a href="https://incubator.apache.org"><img src="https://daffodil.apache.org/assets/themes/apache/img/incubator_feather_egg_logo.png"
+                                                                   alt="Apache Incubator" style="width:100%;"/></a>
+                    </div>
+                    <div class="col-xs-9">
+                        Apache Daffodil is an effort undergoing <a href="https://incubator.apache.org/index.html">Incubation</a>
+                        at The Apache Software Foundation (ASF), sponsored by the Incubator. Incubation is required of all newly
+                        accepted projects until a further review indicates that the infrastructure, communications, and decision
+                        making process have stabilized in a manner consistent with other successful ASF projects. While incubation
+                        status is not necessarily a reflection of the completeness or stability of the code, it does indicate that
+                        the project has yet to be fully endorsed by the ASF.
+                    </div>
+                </div>
+            </div>
+            <hr/>
+            <div>
+                <div style="text-align: center;">
+                    Copyright &#169; 2019 <a href="https://www.apache.org">The Apache Software Foundation</a>.
+                    Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
+                    2.0</a>.
+                    <br/>
+                    Apache, the Apache Incubator project logo, Apache Daffodil, Daffodil, and the
+                    Apache Daffodil logo are trademarks of The Apache Software Foundation.
+                </div>
+            </div>
+        </div>
+    </div>
+</footer>
+          </footer>
+        </div>
+        <script src="https://daffodil.apache.org/assets/themes/apache/jquery/jquery-2.1.1.min.js"></script>
+        <script src="https://daffodil.apache.org/assets/themes/apache/bootstrap/js/bootstrap.min.js"></script>
+      </body>
+      <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
+    </html>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/tutorials/src/main/resources/bitorder.tutorial.tdml.xml b/tutorials/src/main/resources/bitorder.tutorial.tdml.xml
index f2db9d3..a1b7897 100644
--- a/tutorials/src/main/resources/bitorder.tutorial.tdml.xml
+++ b/tutorials/src/main/resources/bitorder.tutorial.tdml.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="http://daffodil.apache.org/assets/tutorials/DFDLTutorialStylesheet.xsl"?>
+<?xml-stylesheet type="text/xsl" href="DFDLTutorialStylesheet.xsl"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
diff --git a/tutorials/src/main/resources/bugReportTemplate.tdml.xml b/tutorials/src/main/resources/bugReportTemplate.tdml.xml
index b8c5dd6..f5c3575 100644
--- a/tutorials/src/main/resources/bugReportTemplate.tdml.xml
+++ b/tutorials/src/main/resources/bugReportTemplate.tdml.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="http://daffodil.apache.org/assets/tutorials/DFDLTutorialStylesheet.xsl"?>
+<?xml-stylesheet type="text/xsl" href="DFDLTutorialStylesheet.xsl"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
diff --git a/tutorials/src/main/resources/exampleTDMLTutorial.tutorial.tdml.xml b/tutorials/src/main/resources/exampleTDMLTutorial.tutorial.tdml.xml
deleted file mode 100644
index 0dc814e..0000000
--- a/tutorials/src/main/resources/exampleTDMLTutorial.tutorial.tdml.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="http://daffodil.apache.org/assets/tutorials/DFDLTutorialStylesheet.xsl"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<tdml:testSuite description="A Sample TDML File Illustrating that a HTML Tutorial Page Can Be Directly Created." 
-  suiteName="test tutorial" 
-  xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData" 
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
-  xmlns:xs="http://www.w3.org/2001/XMLSchema"
-  xmlns:tns="http://example.com" 
-  xmlns:ex="http://example.com" 
-  xmlns="http://www.w3.org/1999/xhtml">
-  <tdml:tutorial>
-    <p>This content is before any of the other content in the TDML file.
-    </p>
-    <p>Here is some sample content. Anything XHTML works here.</p>
-    <p>
-      DFDL has this <a href='http://daffodil.apache.org/docs/dfdl/#_Toc398030723'>bitOrder property</a>. Let's talk about that.
-      Here's a quote from the spec., something I expect many TDML tutorials to want to do so as to highlight specific phrasing or language.
-      </p>
-      <blockquote cite='http://daffodil.apache.org/docs/dfdl/#_Toc398030723'>
-        The bits of a byte each have a place value or significance of 2
-        <sup>n</sup>
-        , for n from 0 to 7.
-        Hence, the byte value 255 = 2
-        <sup>7</sup>
-        + 2
-        <sup>6</sup>
-        + 2
-        <sup>5</sup>
-        + 2
-        <sup>4</sup>
-        + 2
-        <sup>3</sup>
-        + 2
-        <sup>2</sup>
-        + 2
-        <sup>1</sup>
-        + 2
-        <sup>0</sup>
-        .
-        A bit can always be unambiguously identified as the 2
-        <sup>n</sup>
-        -bit.
-        The bit order is the correspondence of a bit's numeric significance to the bit position (1 to 8) within the byte.
-      </blockquote>
-      Now I can think of 36 decimal as a polynomial in any base I want e.g.
-    <p>
-      0x
-      <sup>2 </sup>
-      + 3x
-      <sup>1</sup>
-      + 6x
-      <sup>0</sup>
-      = 36 if x is 10.
-    </p>
-    <p>
-      equivalently, this polynomial:
-    </p>
-    <p>
-      0x
-      <sup>7 </sup>
-      + 0x
-      <sup>6 </sup>
-      + 1x
-      <sup>5 </sup>
-      + 0x
-      <sup>4 </sup>
-      + 0x
-      <sup>3 </sup>
-      + 1x
-      <sup>2 </sup>
-      + 0x
-      <sup>1 </sup>
-      + 0x
-      <sup>0</sup>
-      = 36 when x is 2.
-    </p>
-    <p>
-      Note that the above is only mathematics. No bits have any "positions". They just have their associated mathematical place value that they are being multiplied-by to get a total value.
-    </p>
-    <p>
-      That's enough. Now let's look at the first schema in this demo file. It has nothing whatsoever to do with the above discussion of bit-order.
-    </p>
-  </tdml:tutorial>
-  <tdml:defineSchema name="mySchema">
-    <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
-    <dfdl:format ref="tns:GeneralFormat"/>
-    <xs:element name="data" type="xs:int" dfdl:lengthKind="explicit" dfdl:length="{ xs:unsignedInt(2) }"/>
-    <xs:element tdml:tutorialInclude="no" name="shouldNotShowInTutorial" type="xs:int" dfdl:inputValueCalc="{ 5 }"/>
-  </tdml:defineSchema>
-  
-  <tdml:defineSchema name="shouldNotAppearInTutorial" tdml:tutorialInclude="no">
-    <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
-    <dfdl:format ref="tns:GeneralFormat"/>
-    <xs:element name="shouldNotAppearInTutorial" type="xs:int" dfdl:lengthKind="explicit" dfdl:length="{ xs:unsignedInt(2) }"/>
-  </tdml:defineSchema>
-  
-  <tdml:tutorial>
-    <p>This content is after the first define schema. A schema doesn't have to be first, it just is in this example.</p>
-  </tdml:tutorial>
-  <tdml:parserTestCase name="testTutorialElementsParse" root="data" model="mySchema">
-    <tdml:tutorial>
-      <p>Start of a parser test case.</p>
-    </tdml:tutorial>
-    <tdml:document>37</tdml:document>
-    <tdml:tutorial>
-      <p>After the document element of a parser test case. This would be a common place for some diagrams, so here's examples of two ways of doing that.</p>
-      <p>First we have an image that came from a PNG graphics file drawn somehow. Anything that can create a PNG can work.
-        Also, commonly web files will have links to images in other files, but what we're doing here is including the image data directly in the XHTML of this
-        tutorial TDML file.</p>
-      <img
-        src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAboAAABECAYAAAD3GPBYAAAAAXNSR0ICQMB9xQAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUATWljcm9zb2Z0IE9mZmljZX/tNXEAAB6OSURBVHja7Z0H2BXV0cdDBwFBEVEUsYu9iyJYKPZPjd1gb7F3xYZiAbEksSv2XrD3XmLvXaNGYxJjNMWSpiZq7nd++83wLMuWs3f3XF/eb+Z5/o++dy977jl7Zv4zc+ac/dHxxx//I4PBYDAY2itsEAwGg8FgRGcwGAwGgxGdwWAwGAxGdAaDwWAwGNEZDAaDwWBEZzAYDAZDZaJzMtBhY4PBYDAY2jDWdejcLNFt27Fjx8Ycc8wRFLPPPnvDtdXo27dv8Lb69OkTtUWbodvq1atXo0OHDsHbmW222aI+8d/Qbc0666xRW/369 [...]
-      <p>Next we have an SVG diagram. A great thing about HTML5 is that SVG is part of it, so you can just put diagrams
-        directly into your HTML.</p>
-      <svg width="100%" height="80" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
-        <g>
-          <title>Layer 1</title>
-          <rect id="svg_1" height="55" width="87" y="10" x="44" stroke-width="5" stroke="#000000" fill="#FF0000"/>
-          <rect id="svg_2" height="58" width="131" y="10" x="172" stroke-width="5" stroke="#000000" fill="#FF0000"/>
-          <rect id="svg_3" height="58" width="96" y="10" x="353" stroke-width="5" stroke="#000000" fill="#FF0000"/>
-          <rect id="svg_4" height="61" width="103" y="10" x="488" stroke-width="5" stroke="#000000" fill="#FF0000"/>
-        </g>
-      </svg>
-      <p>Well that was fun. Now let's look at the Infoset.</p>
-    </tdml:tutorial>
-    <tdml:infoset>
-      <tdml:dfdlInfoset>
-        <ex:data>37</ex:data>
-      </tdml:dfdlInfoset>
-    </tdml:infoset>
-    <tdml:tutorial>
-      <p>After the infoset element of a parser test case we're going to summarize here about the example (parserTestCase) above.</p>
-    </tdml:tutorial>
-  </tdml:parserTestCase>
-  <tdml:tutorial>
-    <p>This is between the above example, and the next DFDL schema in the tutorial. Here's another DFDL schema. This one will be an unparsing
-      example.</p>
-  </tdml:tutorial>
-  <tdml:defineSchema name="s">
-    <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
-    <dfdl:format ref="ex:GeneralFormat"/>
-    <xs:element name="bar" dfdl:lengthKind="explicit" dfdl:length="5" type="xs:string"/>
-  </tdml:defineSchema>
-  <tdml:tutorial>
-    <p>Ok, that was a pretty dull schema. Now let's look at the example that uses it.</p>
-  </tdml:tutorial>
-  <tdml:unparserTestCase name="testTutorialElementsUnparse" root="bar" model="s">
-    <tdml:tutorial>
-      <p>At the begining of the unparserTestCase we would explain the infoset we're going to unparse. But we want to show
-      that we can suppress them if we want. So there should NOT be an infoset below.</p>
-    </tdml:tutorial>
-    <tdml:infoset tdml:tutorialInclude="no">
-      <tdml:dfdlInfoset>
-        <ex:bar>Hello</ex:bar>
-      </tdml:dfdlInfoset>
-    </tdml:infoset>
-    <tdml:tutorial>
-      <p>That was NOT a pretty nice little infoset. Now we'll discuss the data we expect to be produced from it by unparsing.</p>
-    </tdml:tutorial>
-    <tdml:document>Hello</tdml:document>
-    <tdml:tutorial>
-      <p>But enough about data. Let's talk about how cool it is to create tutorials directly from TDML.</p>
-    </tdml:tutorial>
-  </tdml:unparserTestCase>
-  <tdml:tutorial>
-    <p>After that unparser example (before whatever is next - another schema, another test case/example. In this case we're just going to end here.</p>
-  </tdml:tutorial>
-</tdml:testSuite>
diff --git a/tutorials/src/main/resources/tdmlTutorial.tdml.xml b/tutorials/src/main/resources/tdmlTutorial.tdml.xml
index acdfa43..a5e2258 100644
--- a/tutorials/src/main/resources/tdmlTutorial.tdml.xml
+++ b/tutorials/src/main/resources/tdmlTutorial.tdml.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ASCII"?>
-<?xml-stylesheet type="text/xsl" href="http://daffodil.apache.org/assets/tutorials/DFDLTutorialStylesheet.xsl"?>
+<?xml-stylesheet type="text/xsl" href="DFDLTutorialStylesheet.xsl"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
diff --git a/tutorials/src/test/scala/org/apache/daffodil/tutorials/TestTutorials.scala b/tutorials/src/test/scala/org/apache/daffodil/tutorials/TestTutorials.scala
index 88bc288..a94205d 100644
--- a/tutorials/src/test/scala/org/apache/daffodil/tutorials/TestTutorials.scala
+++ b/tutorials/src/test/scala/org/apache/daffodil/tutorials/TestTutorials.scala
@@ -23,13 +23,11 @@ import org.junit.AfterClass
 
 object TestTutorials {
   val runner1 = Runner("/", "bitorder.tutorial.tdml.xml")
-  val runner2 = Runner("/", "exampleTDMLTutorial.tutorial.tdml.xml")
   val runner4 = Runner("/", "tdmlTutorial.tdml.xml")
   val runner5 = Runner("/", "bugReportTemplate.tdml.xml")
 
   @AfterClass def shutDown {
     runner1.reset
-    runner2.reset
     runner4.reset
     runner5.reset
   }
@@ -38,9 +36,6 @@ object TestTutorials {
 class TestTutorials {
   import TestTutorials._
 
-  @Test def testTutorialElementsParse() { runner2.runOneTest("testTutorialElementsParse") }
-  @Test def testTutorialElementsUnparse() { runner2.runOneTest("testTutorialElementsUnparse") }
-
   // removed for now. This will probably go back into this tutorial
   // @Test def test_MIL2045_47001D_1() { runner1.runOneTest("TestMIL2045_47001D_1") }
   @Test def test_leastSignificantBitFirst() { runner1.runOneTest("leastSignificantBitFirst") }