maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r739143 - /maven/doxia/site/src/site/fml/faq.fml
Date Fri, 30 Jan 2009 02:22:26 GMT
Author: vsiveton
Date: Fri Jan 30 02:22:26 2009
New Revision: 739143

URL: http://svn.apache.org/viewvc?rev=739143&view=rev
Log:
o added an faq about entities

Modified:
    maven/doxia/site/src/site/fml/faq.fml

Modified: maven/doxia/site/src/site/fml/faq.fml
URL: http://svn.apache.org/viewvc/maven/doxia/site/src/site/fml/faq.fml?rev=739143&r1=739142&r2=739143&view=diff
==============================================================================
--- maven/doxia/site/src/site/fml/faq.fml (original)
+++ maven/doxia/site/src/site/fml/faq.fml Fri Jan 30 02:22:26 2009
@@ -134,5 +134,38 @@
         </p>
       </answer>
     </faq>
+    <faq id="doxia-character-entities">
+      <question>How to define character entities in Doxia XML files with XSD?</question>
+      <answer>
+        <p>
+          Since it is not possible to define character entity references (like &#x26;copy;)
in XSDs (unlike DTDs), each
+          XML file should have a &lt;!DOCTYPE&gt; to define the character entity
set.
+        </p>
+        <p>
+          For instance, you could add the following in your Xdoc XML files to be similar
to XHTML 1.0 Transitional dtd:
+        <source>
+&lt;!DOCTYPE document [
+  &lt;!-- These are the entity sets for ISO Latin 1 characters for the XHTML --&gt;
+  &lt;!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"&gt;
+  %HTMLlat1;
+  &lt;!-- These are the entity sets for special characters for the XHTML --&gt;
+  &lt;!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent"&gt;
+  %HTMLsymbol;
+  &lt;!-- These are the entity sets for symbol characters for the XHTML --&gt;
+  &lt;!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"&gt;
+  %HTMLspecial;
+]&gt;
+&lt;document xmlns="http://maven.apache.org/XDOC/2.0"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd"&gt;
+...
+&lt;/document&gt;</source>
+        </p>
+        <p>
+          <b>Note</b>: if CDATA is used to specify entity, Doxia will replace
&amp; by &amp;amp; (i.e
+          &quot;&lt;![CDATA[&amp;iexcl;]]&gt;&quot; becomes &quot;&amp;amp;iexcl;&quot;).
+        </p>
+      </answer>
+    </faq>
   </part>
 </faqs>
\ No newline at end of file



Mime
View raw message