[4suite-checkins] In Amara/docs, files manual.xml

Uche Ogbuji uogbuji at 4suite.org
Sat Jul 29 08:46:59 MDT 2006


Update of /var/local/cvsroot/Amara/docs
In directory dollar:/tmp/cvs-serv4141/docs

Modified Files:
	manual.xml 
Log Message:
Add trimxml.py, a new command line tool for running reports on XML files
Minor performance boost for parsing into bindery objects
Allow prefixes to be specified in amara.create_document()
Add fixup_namespaces utility function.  Helps reduce namespace psychosis
Add quick_xml_scan utility function.  Scans through an XML file to extract a single field
Add saxtools.sniff_namespace.  Looks only at the top-level element in a document to report its namespace declarations
Add scimitar support for extension functions that create node sets
Add optional scimitar support for legacy Schematron NS
Add scimitar support for Schematron abstract rules
Update to use of xsl:key rather than sch:key in ISO schematron



ViewCVS diff:
  http://cvs.4suite.org/viewcvs/Amara/docs/manual.xml.diff?r1=1.3&r2=1.4
ViewCVS view:
  http://cvs.4suite.org/viewcvs/Amara/docs/manual.xml?rev=1.4&content-type=text/vnd.viewcvs-markup

Index: manual.xml
===================================================================
RCS file: /var/local/cvsroot/Amara/docs/manual.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -U2 -r1.3 -r1.4
--- manual.xml	7 Jun 2006 14:43:36 -0000	1.3
+++ manual.xml	29 Jul 2006 14:46:59 -0000	1.4
@@ -778,8 +778,7 @@
 <hello/>
       </programlisting>
-      <para>Fleshing it out a bit the following code:</para>
+      <para>You can specify a root element to be created in the empty document.  The following code:</para>
       <programlisting>
-doc = amara.create_document()
-doc.xml_append(doc.xml_create_element(u"hello"))
+doc = amara.create_document(u"hello")
 doc.hello.xml_append(doc.xml_create_element(u"world"))
 doc.xml()
@@ -791,5 +790,13 @@
 &lt;hello&gt;&lt;world/&gt;&lt;/hello&gt;
       </programlisting>
-      <para>And so on.</para>
+      <para>This is equivalent to:</para>
+      <programlisting>
+doc = amara.create_document()
+doc.xml_append(doc.xml_create_element(u"hello"))
+doc.hello.xml_append(doc.xml_create_element(u"world"))
+doc.xml()
+
+      </programlisting>
+      <para>You can set a namespace on the root element using the <command>ns</command> parameter.  There are many other useful parameters.  Try <command>import amara; help(amara.create_document)</command> at a Python prompt for more details.</para>
     </section>
     <section id="deepcopies">



More information about the 4suite-checkins mailing list