| <?xml version="1.0"?> |
| |
| <!--+ |
| | Populates XMLDB with some samples data |
| | CVS $Id: populate.xml,v 1.5 2004/02/13 00:38:35 joerg Exp $ |
| +--> |
| |
| <html> |
| <h2>Populating XML:DB with sample data</h2> |
| <h3>Create collection ...</h3> |
| <p>Create collection should succeed on the first run, but will fail on subsequent runs</p> |
| <textarea cols="75" rows="3"> |
| <x:query type="create" oid="cocoon/" xmlns:x="http://apache.org/cocoon/xmldb/1.0"/> |
| </textarea> |
| |
| <h3>Import sitemap.xmap ...</h3> |
| <textarea cols="75" rows="3"> |
| <x:query type="create" collection="cocoon" oid="sitemap" xmlns:x="http://apache.org/cocoon/xmldb/1.0"> |
| <i:include src="sitemap.xmap" xmlns:i="http://apache.org/cocoon/include/1.0"/> |
| </x:query> |
| </textarea> |
| |
| <h3>Import xmldb2samples.xsl ...</h3> |
| <textarea cols="75" rows="3"> |
| <x:query type="create" collection="cocoon" oid="xmldb2samples.xsl" xmlns:x="http://apache.org/cocoon/xmldb/1.0"> |
| <i:include src="xmldb2samples.xsl" xmlns:i="http://apache.org/cocoon/include/1.0"/> |
| </x:query> |
| </textarea> |
| |
| <h3>Import samples.xml ...</h3> |
| <textarea cols="75" rows="3"> |
| <x:query type="create" collection="cocoon" oid="samples.xml" xmlns:x="http://apache.org/cocoon/xmldb/1.0"> |
| <i:include src="samples.xml" xmlns:i="http://apache.org/cocoon/include/1.0"/> |
| </x:query> |
| </textarea> |
| |
| <h3>Perform XUpdate on samples.xml ...</h3> |
| <textarea cols="75" rows="3"> |
| <x:query type="update" collection="cocoon" oid="samples.xml" xmlns:x="http://apache.org/cocoon/xmldb/1.0"> |
| <xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate"> |
| <xu:remove select="/samples/group[@name = 'Init Database']"/> |
| <xu:update select="/samples/group[@name = 'XMLDB Samples']/sample[@name='Mount DB']/@name">Mount FS</xu:update> |
| <xu:update select="/samples/group[@name = 'XMLDB Samples']/sample[@name='Mount FS']/@href">..</xu:update> |
| <xu:update select="/samples/group[@name = 'XMLDB Samples']/sample[@name='Mount FS']"> |
| Go back to the file system version of this page. |
| </xu:update> |
| <xu:append select="/samples/group[@name = 'XMLDB Samples']" child="1"> |
| <note> |
| This sitemap, page, and XSLT stylesheet for browser, all are served from |
| the XML:DB. Click below to go back to file system version. |
| </note> |
| </xu:append> |
| </xu:modifications> |
| </x:query> |
| </textarea> |
| |
| <h3>Import samples.xml as xsamples.xml ...</h3> |
| <textarea cols="75" rows="3"> |
| <x:query type="create" collection="cocoon" oid="xsamples.xml" xmlns:x="http://apache.org/cocoon/xmldb/1.0"> |
| <i:include src="samples.xml" xmlns:i="http://apache.org/cocoon/include/1.0"/> |
| </x:query> |
| </textarea> |
| |
| <h3>Perform XUpdate on xsamples.xml ...</h3> |
| <textarea cols="75" rows="3"> |
| <x:query type="update" collection="cocoon" oid="xsamples.xml" xmlns:x="http://apache.org/cocoon/xmldb/1.0"> |
| <xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate"> |
| <xu:remove select="/samples/group[@name = 'XMLDB Samples']/sample[@name='Mount DB']"/> |
| |
| <xu:update select="/samples/group[@name = 'XMLDB Samples']/sample[@name='From DB']/@name">From File System</xu:update> |
| <xu:update select="/samples/group[@name = 'XMLDB Samples']/sample[@name='From File System']/@href">welcome</xu:update> |
| <xu:update select="/samples/group[@name = 'XMLDB Samples']/sample[@name='From File System']"> |
| Go back to the file system version of this page. |
| </xu:update> |
| <xu:append select="/samples/group[@name = 'XMLDB Samples']" child="1"> |
| <note> |
| This page is served from the XML:DB. Click below to go back to file system |
| version of the file. |
| </note> |
| </xu:append> |
| </xu:modifications> |
| </x:query> |
| </textarea> |
| |
| <h3>Done</h3> |
| <p>Review results of all operations and go check other samples.</p> |
| <a href="./">Go Back</a> |
| </html> |