Markup cleanup.
authorCameron McCormack <cam@mcc.id.au>
Thu, 17 May 2012 15:51:27 +1000
changeset 86 44fd2b756dde
parent 85 4c01d3b0b847
child 87 7560e472b799
Markup cleanup.
master/extend.html
--- a/master/extend.html	Thu May 17 15:49:05 2012 +1000
+++ b/master/extend.html	Thu May 17 15:51:27 2012 +1000
@@ -16,94 +16,103 @@
 
 <h2 id="ForeignNamespaces">Foreign namespaces and private data</h2>
 
-    <p>SVG allows inclusion of elements from foreign namespaces
-    anywhere with the SVG content. In general, the SVG user agent
-    will include the unknown elements in the DOM but will otherwise
-    ignore unknown elements. (The notable exception is described
-    under <a href="#ForeignObjectElement">Embedding Foreign Object
-    Types</a>.)</p>
-    <p>Additionally, SVG allows inclusion of attributes from
-    foreign namespaces on any SVG element. The SVG user agent will
-    include unknown attributes in the DOM but with otherwise ignore
-    unknown attributes.</p>
-    <p>SVG's ability to include foreign namespaces can be used for
-    the following purposes:</p>
-    <ul>
-      <li>Application-specific information so that authoring
-      applications can include model-level data in the SVG content
-      to serve their "roundtripping" purposes (i.e., the ability to
-      write, then read a file without loss of higher-level
-      information).</li>
-      <li>Supplemental data for extensibility. For example, suppose
-      you have an extrusion extension which takes any 2D graphics
-      and extrudes it in three dimensions. When applying the
-      extrusion extension, you probably will need to set some
-      parameters. The parameters can be included in the SVG content
-      by inserting elements from an extrusion extension
-      namespace.</li>
-    </ul>
-    <p>To illustrate, a business graphics authoring application
-    might want to include some private data within an SVG document
-    so that it could properly reassemble the chart (a pie chart in
-    this case) upon reading it back in:</p>
-<pre>
-&lt;?xml version="1.0" standalone="yes"?&gt;
-&lt;svg width="4in" height="3in" version="1.1"
-     xmlns = 'http://www.w3.org/2000/svg'&gt;
-  &lt;defs&gt;
-    &lt;myapp:piechart xmlns:myapp="http://example.org/myapp"
-                    title="Sales by Region"&gt;
-      &lt;myapp:pieslice label="Northern Region" value="1.23"/&gt;
-      &lt;myapp:pieslice label="Eastern Region" value="2.53"/&gt;
-      &lt;myapp:pieslice label="Southern Region" value="3.89"/&gt;
-      &lt;myapp:pieslice label="Western Region" value="2.04"/&gt;
-      &lt;!-- Other private data goes here --&gt;
-    &lt;/myapp:piechart&gt;
-  &lt;/defs&gt;
-  &lt;desc&gt;This chart includes private data in another namespace
-  &lt;/desc&gt;
-  &lt;!-- In here would be the actual SVG graphics elements which
-       draw the pie chart --&gt;
-&lt;/svg&gt;
-</pre>
+<p>SVG allows inclusion of elements from foreign namespaces
+anywhere with the SVG content. In general, the SVG user agent
+will include the unknown elements in the DOM but will otherwise
+ignore unknown elements. (The notable exception is described
+under <a href="#ForeignObjectElement">Embedding Foreign Object
+Types</a>.)</p>
+
+<p>Additionally, SVG allows inclusion of attributes from
+foreign namespaces on any SVG element. The SVG user agent will
+include unknown attributes in the DOM but with otherwise ignore
+unknown attributes.</p>
+
+<p>SVG's ability to include foreign namespaces can be used for
+the following purposes:</p>
+
+<ul>
+  <li>Application-specific information so that authoring
+  applications can include model-level data in the SVG content
+  to serve their "roundtripping" purposes (i.e., the ability to
+  write, then read a file without loss of higher-level
+  information).</li>
+
+  <li>Supplemental data for extensibility. For example, suppose
+  you have an extrusion extension which takes any 2D graphics
+  and extrudes it in three dimensions. When applying the
+  extrusion extension, you probably will need to set some
+  parameters. The parameters can be included in the SVG content
+  by inserting elements from an extrusion extension
+  namespace.</li>
+</ul>
+
+<p>To illustrate, a business graphics authoring application
+might want to include some private data within an SVG document
+so that it could properly reassemble the chart (a pie chart in
+this case) upon reading it back in:</p>
+
+<pre><![CDATA[
+<?xml version="1.0" standalone="yes"?>
+<svg width="4in" height="3in" version="1.1"
+     xmlns = 'http://www.w3.org/2000/svg'>
+  <defs>
+    <myapp:piechart xmlns:myapp="http://example.org/myapp"
+                    title="Sales by Region">
+      <myapp:pieslice label="Northern Region" value="1.23"/>
+      <myapp:pieslice label="Eastern Region" value="2.53"/>
+      <myapp:pieslice label="Southern Region" value="3.89"/>
+      <myapp:pieslice label="Western Region" value="2.04"/>
+      <!-- Other private data goes here -->
+    </myapp:piechart>
+  </defs>
+  <desc>This chart includes private data in another namespace
+  </desc>
+  <!-- In here would be the actual SVG graphics elements which
+       draw the pie chart -->
+</svg>
+]]></pre>
 
 <h2 id="EmbeddingForeignObjects">Embedding foreign object types</h2>
 
-    <p>One goal for SVG is to provide a mechanism by which other
-    XML language processors can render into an area within an SVG
-    drawing, with those renderings subject to the various
-    transformations and compositing parameters that are currently
-    active at a given point within the SVG content tree. One
-    particular example of this is to provide a frame for XML
-    content styled with CSS or XSL so that dynamically reflowing
-    text (subject to SVG transformations and compositing) could be
-    inserted into the middle of some SVG content. Another example
-    is inserting a <a
-    href="http://www.w3.org/TR/2003/REC-MathML2-20031021/">MathML</a> expression into
-    an SVG drawing [<a href='refs.html#ref-MATHML'>MATHML</a>].</p>
-    <p>The <a>'foreignObject'</a>
-    element allows for inclusion of a foreign namespace which has
-    its graphical content drawn by a different user agent. The
-    included foreign graphical content is subject to SVG
-    transformations and compositing.</p>
-    <p>The contents of <a>'foreignObject'</a> are assumed to be
-    from a different namespace. Any SVG elements within a <a>'foreignObject'</a> will not be drawn,
-    except in the situation where a properly defined SVG
-    subdocument with a proper <span class="attr-name">'xmlns'</span>
-    (see <a href="http://www.w3.org/TR/2006/REC-xml-names-20060816/"><cite>Namespaces in XML</cite></a>
-    [<a href="refs.html#ref-XML-NS">XML-NS</a>])
-    attribute specification is embedded recursively. One situation
-    where this can occur is when an SVG document fragment is
-    embedded within another non-SVG document fragment, which in
-    turn is embedded within an SVG document fragment (e.g., an SVG
-    document fragment contains an XHTML document fragment which in
-    turn contains yet another SVG document fragment).</p>
-    <p>Usually, a <a>'foreignObject'</a>
-    will be used in conjunction with the <a>'switch'</a> element and
-    the <a>'requiredExtensions'</a> attribute to
-    provide proper checking for user agent support and provide an
-    alternate rendering in case user agent support is not
-    available.</p>
+<p>One goal for SVG is to provide a mechanism by which other
+XML language processors can render into an area within an SVG
+drawing, with those renderings subject to the various
+transformations and compositing parameters that are currently
+active at a given point within the SVG content tree. One
+particular example of this is to provide a frame for XML
+content styled with CSS or XSL so that dynamically reflowing
+text (subject to SVG transformations and compositing) could be
+inserted into the middle of some SVG content. Another example
+is inserting a <a
+href="http://www.w3.org/TR/2003/REC-MathML2-20031021/">MathML</a> expression into
+an SVG drawing [<a href='refs.html#ref-MATHML'>MATHML</a>].</p>
+
+<p>The <a>'foreignObject'</a>
+element allows for inclusion of a foreign namespace which has
+its graphical content drawn by a different user agent. The
+included foreign graphical content is subject to SVG
+transformations and compositing.</p>
+
+<p>The contents of <a>'foreignObject'</a> are assumed to be
+from a different namespace. Any SVG elements within a <a>'foreignObject'</a> will not be drawn,
+except in the situation where a properly defined SVG
+subdocument with a proper <span class="attr-name">'xmlns'</span>
+(see <a href="http://www.w3.org/TR/2006/REC-xml-names-20060816/"><cite>Namespaces in XML</cite></a>
+[<a href="refs.html#ref-XML-NS">XML-NS</a>])
+attribute specification is embedded recursively. One situation
+where this can occur is when an SVG document fragment is
+embedded within another non-SVG document fragment, which in
+turn is embedded within an SVG document fragment (e.g., an SVG
+document fragment contains an XHTML document fragment which in
+turn contains yet another SVG document fragment).</p>
+
+<p>Usually, a <a>'foreignObject'</a>
+will be used in conjunction with the <a>'switch'</a> element and
+the <a>'requiredExtensions'</a> attribute to
+provide proper checking for user agent support and provide an
+alternate rendering in case user agent support is not
+available.</p>
 
 <h2 id="ForeignObjectElement">The <span class="element-name">'foreignObject'</span> element</h2>
 
@@ -164,65 +173,69 @@
 
 <h2 id="AnExample">An example</h2>
 
-    <p>Here is an example:</p>
-<pre>
-&lt;?xml version="1.0" standalone="yes"?&gt;
-&lt;svg width="4in" height="3in" version="1.1"
- xmlns = 'http://www.w3.org/2000/svg'&gt;
-  &lt;desc&gt;This example uses the 'switch' element to provide a 
+<p>Here is an example:</p>
+
+<pre><![CDATA[
+<?xml version="1.0" standalone="yes"?>
+<svg width="4in" height="3in" version="1.1"
+ xmlns = 'http://www.w3.org/2000/svg'>
+  <desc>This example uses the 'switch' element to provide a 
         fallback graphical representation of an paragraph, if 
-        XMHTML is not supported.&lt;/desc&gt;
-  &lt;!-- The 'switch' element will process the first child element
-       whose testing attributes evaluate to true.--&gt;
-  &lt;switch&gt;
-    &lt;!-- Process the embedded XHTML if the requiredExtensions attribute
+        XMHTML is not supported.</desc>
+  <!-- The 'switch' element will process the first child element
+       whose testing attributes evaluate to true.-->
+  <switch>
+    <!-- Process the embedded XHTML if the requiredExtensions attribute
          evaluates to true (i.e., the user agent supports XHTML
-         embedded within SVG). --&gt;
-    &lt;foreignObject width="100" height="50"
-                   requiredExtensions="http://example.com/SVGExtensions/EmbeddedXHTML"&gt;
-      &lt;!-- XHTML content goes here --&gt;
-      &lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
-        &lt;p&gt;Here is a paragraph that requires word wrap&lt;/p&gt;
-      &lt;/body&gt;
-    &lt;/foreignObject&gt;
-    &lt;!-- Else, process the following alternate SVG.
+         embedded within SVG). -->
+    <foreignObject width="100" height="50"
+                   requiredExtensions="http://example.com/SVGExtensions/EmbeddedXHTML">
+      <!-- XHTML content goes here -->
+      <body xmlns="http://www.w3.org/1999/xhtml">
+        <p>Here is a paragraph that requires word wrap</p>
+      </body>
+    </foreignObject>
+    <!-- Else, process the following alternate SVG.
          Note that there are no testing attributes on the 'text' element.
          If no testing attributes are provided, it is as if there
-         were testing attributes and they evaluated to true.--&gt;
-    &lt;text font-size="10" font-family="Verdana"&gt;
-      &lt;tspan x="10" y="10"&gt;Here is a paragraph that&lt;/tspan&gt;
-      &lt;tspan x="10" y="20"&gt;requires word wrap.&lt;/tspan&gt;
-    &lt;/text&gt;
-  &lt;/switch&gt;
-&lt;/svg&gt;
-</pre>
+         were testing attributes and they evaluated to true.-->
+    <text font-size="10" font-family="Verdana">
+      <tspan x="10" y="10">Here is a paragraph that</tspan>
+      <tspan x="10" y="20">requires word wrap.</tspan>
+    </text>
+  </switch>
+</svg>
+]]></pre>
 
-    <p>It is not required that SVG user agent support the ability
-    to invoke other arbitrary user agents to handle embedded
-    foreign object types; however, all conforming SVG user agents
-    would need to support the <a>'switch'</a> element and
-    must be able to render valid SVG elements when they appear as
-    one of the alternatives within a <a>'switch'</a>
-    element.</p>
-    <p>Ultimately, it is expected that commercial Web browsers will
-    support the ability for SVG to embed content from other XML
-    grammars which use CSS or XSL to format their content, with the
-    resulting CSS- or XSL-formatted content subject to SVG
-    transformations and compositing. At this time, such a
-    capability is not a requirement.</p>
+<p>It is not required that SVG user agent support the ability
+to invoke other arbitrary user agents to handle embedded
+foreign object types; however, all conforming SVG user agents
+would need to support the <a>'switch'</a> element and
+must be able to render valid SVG elements when they appear as
+one of the alternatives within a <a>'switch'</a>
+element.</p>
+
+<p>Ultimately, it is expected that commercial Web browsers will
+support the ability for SVG to embed content from other XML
+grammars which use CSS or XSL to format their content, with the
+resulting CSS- or XSL-formatted content subject to SVG
+transformations and compositing. At this time, such a
+capability is not a requirement.</p>
 
 <h2 id="PrivateElementsAndAttribute">Adding private elements and attributes to the DTD</h2>
 
-    <p>Using foreign namespaces as an extension mechanism adds flexibility, is
-    readily handled by validation technologies like NVDL and RelaxNG, but typically
-    breaks DTD validation unless the DTD has explicit extensibility hooks.</p>
-    <p>The SVG DTD allows for extending the SVG language within the
-    internal DTD subset. Within the internal DTD subset, you have
-    the ability to add custom elements and attributes to most SVG
-    elements. This facility may be used if DTD validation is desired.</p>
-    <p>The DTD defines an extension entity for most of SVG
-    elements. For example, the <a>'view'</a> element is defined in
-    the DTD as follows:</p>
+<p>Using foreign namespaces as an extension mechanism adds flexibility, is
+readily handled by validation technologies like NVDL and RelaxNG, but typically
+breaks DTD validation unless the DTD has explicit extensibility hooks.</p>
+
+<p>The SVG DTD allows for extending the SVG language within the
+internal DTD subset. Within the internal DTD subset, you have
+the ability to add custom elements and attributes to most SVG
+elements. This facility may be used if DTD validation is desired.</p>
+
+<p>The DTD defines an extension entity for most of SVG
+elements. For example, the <a>'view'</a> element is defined in
+the DTD as follows:</p>
 
 <pre class="dtd-fragment"><![CDATA[
 <!ENTITY % SVG.view.extra.content "" >
@@ -248,14 +261,15 @@
 <!-- end of SVG.view.attlist -->]]>]]&gt;
 </pre>
 
-    <p>The entity <code>SVG.view.extra.content</code> can be defined in the
-    internal DTD subset to add custom sub-elements
-    attributes to the <a>'view'</a> element within a given
-    document, and an <code>&lt;!ATTLIST></code> can be used to add
-    custom attributes. For example, the following extends the <a>'view'</a> element with an
-    additional child element <span
-    class="element-name">'customNS:customElement'</span> and an
-    additional attribute <span class="attr-name">'customNS:customAttr'</span>:</p>
+<p>The entity <code>SVG.view.extra.content</code> can be defined in the
+internal DTD subset to add custom sub-elements
+attributes to the <a>'view'</a> element within a given
+document, and an <code>&lt;!ATTLIST></code> can be used to add
+custom attributes. For example, the following extends the <a>'view'</a> element with an
+additional child element <span
+class="element-name">'customNS:customElement'</span> and an
+additional attribute <span class="attr-name">'customNS:customAttr'</span>:</p>
+
 <pre><![CDATA[
 <?xml version="1.0" standalone="no"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"