]> git.sesse.net Git - xml-template/blobdiff - doc/intro.txt
Document that we have a C++0x version.
[xml-template] / doc / intro.txt
index 448ded6c6138d2a81103ddc5b5fe88ba92579606..b727bfffa1e47faf9b8abed809f1d973465806ae 100644 (file)
@@ -16,12 +16,13 @@ favourite distribution and do "bzr get http://bzr.sesse.net/xml-template/"
 to check out the code and this documentation.
 
 There is a lot to be said about design philosophy, but let's first give a
-simple example to give you the feel of how it works. (The example is in
-Perl, but there are also functionally equivalent PHP and Python versions,
-and more languages should probably come soon.)
+simple example to give you the feel of how it works. (The example is in Perl,
+but there are also functionally equivalent PHP, Python, Ruby and C++11
+versions; ports to other languages would be welcome.)
 
 Template (simple.xml):
 
+  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <!DOCTYPE
     html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -47,6 +48,7 @@ Code (simple.pl):
 
 Result:
 
+  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
     <head>
@@ -80,6 +82,7 @@ We move on to another useful operation, cloning.
 
 Template (clone.xml):
 
+  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <!DOCTYPE
     html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -114,6 +117,7 @@ Code (clone.pl):
 
 Result:
 
+  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
     <head>
@@ -166,6 +170,7 @@ we have a small hack:
 
 Template (clone.xml), repeated for your convenience:
 
+  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <!DOCTYPE
     html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -200,6 +205,7 @@ Code (attribute.pl):
 
 Result:
 
+  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
     <head>
@@ -248,13 +254,15 @@ The main thoughts behind XML::Template have been, in no particular order:
    than only supporting one language or having someting that needs to reimplement
    the entire DOM with wrappers for each language. (Thankfully, by relying on
    the DOM support in each language, the code so far is under 200 lines per
-   implementation, so maintaining this hopefully shouldn't be much work.)
-   As proof-of-concept, I've got Perl, PHP and Python implementations that work
-   and feel largely the same -- Ruby and other implementations are welcome.
-   (This is backed up by a test suite, which ensures that all the different
-   implementations return structurally equivalent XML for a certain set of
-   test cases. Porting to a new language is not difficult, and once you've
-   got all the test cases to pass, your work is most likely done.)
+   implementation, so maintaining this hopefully shouldn't be much work.) As
+   proof-of-concept, there are got Perl, PHP, Python, Ruby and C++11
+   implementations that work and feel largely the same (and even a SAX-based Perl
+   implementation, for larger trees that won't fit into memory) -- other
+   implementations are welcome.  This is backed up by a test suite, which
+   ensures that all the different implementations return structurally
+   equivalent XML for a certain set of test cases. Porting to a new language
+   is not difficult, and once you've got all the test cases to pass, your
+   work is most likely done.
 
 As a side note to the second point, I've spent some time wondering exactly
 _why_ you want to separate the back-end logic from your HTML, and why people