examples: update XML example (namespace, metadata) and move it to a separate file v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Fri, 11 Jan 2019 23:08:47 +0100
branchv_0
changeset 234 2fc56dd7f003
parent 233 a8029bd1c87a
child 235 04e922dd748c
examples: update XML example (namespace, metadata) and move it to a separate file
relpipe-data/examples.xml
relpipe-data/examples/relpipe-out-fstab.xml
--- a/relpipe-data/examples.xml	Fri Jan 11 22:46:29 2019 +0100
+++ b/relpipe-data/examples.xml	Fri Jan 11 23:08:47 2019 +0100
@@ -203,57 +203,7 @@
 			Will produce XML like this:
 		</p>
 		
-		<m:pre jazyk="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-<pipe>
-	<relation>
-		<name>fstab</name>
-		<record>
-			<attribute>UUID</attribute>
-			<attribute>29758270-fd25-4a6c-a7bb-9a18302816af</attribute>
-			<attribute>/</attribute>
-			<attribute>ext4</attribute>
-			<attribute>relatime,user_xattr,errors=remount-ro</attribute>
-			<attribute>0</attribute>
-			<attribute>1</attribute>
-		</record>
-		<record>
-			<attribute></attribute>
-			<attribute>/dev/sr0</attribute>
-			<attribute>/media/cdrom0</attribute>
-			<attribute>udf,iso9660</attribute>
-			<attribute>user,noauto</attribute>
-			<attribute>0</attribute>
-			<attribute>0</attribute>
-		</record>
-		<record>
-			<attribute></attribute>
-			<attribute>/dev/sde</attribute>
-			<attribute>/mnt/data</attribute>
-			<attribute>ext4</attribute>
-			<attribute>relatime,user_xattr,errors=remount-ro</attribute>
-			<attribute>0</attribute>
-			<attribute>2</attribute>
-		</record>
-		<record>
-			<attribute>UUID</attribute>
-			<attribute>a2b5f230-a795-4f6f-a39b-9b57686c86d5</attribute>
-			<attribute>/home</attribute>
-			<attribute>btrfs</attribute>
-			<attribute>relatime</attribute>
-			<attribute>0</attribute>
-			<attribute>2</attribute>
-		</record>
-		<record>
-			<attribute></attribute>
-			<attribute>/dev/mapper/sdf_crypt</attribute>
-			<attribute>/mnt/private</attribute>
-			<attribute>xfs</attribute>
-			<attribute>relatime</attribute>
-			<attribute>0</attribute>
-			<attribute>2</attribute>
-		</record>
-	</relation>
-</pipe>]]></m:pre>
+		<m:pre jazyk="xml" src="examples/relpipe-out-fstab.xml"/>
 
 		<p>
 			Thanks to XSLT, this XML can be easily converted e.g. to an XHTML table (<code>table|tr|td</code>) or other format.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/relpipe-data/examples/relpipe-out-fstab.xml	Fri Jan 11 23:08:47 2019 +0100
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<relpipe xmlns="tag:globalcode.info,2018:relpipe">
+	<relation>
+		<name>fstab</name>
+		<attributes-metadata>
+			<attribute-metadata name="scheme" type="string"/>
+			<attribute-metadata name="device" type="string"/>
+			<attribute-metadata name="mount_point" type="string"/>
+			<attribute-metadata name="type" type="string"/>
+			<attribute-metadata name="options" type="string"/>
+			<attribute-metadata name="dump" type="integer"/>
+			<attribute-metadata name="pass" type="integer"/>
+		</attributes-metadata>
+		<record>
+			<attribute name="scheme" type="string">UUID</attribute>
+			<attribute name="device" type="string">29758270-fd25-4a6c-a7bb-9a18302816af</attribute>
+			<attribute name="mount_point" type="string">/</attribute>
+			<attribute name="type" type="string">ext4</attribute>
+			<attribute name="options" type="string">relatime,user_xattr,errors=remount-ro</attribute>
+			<attribute name="dump" type="integer">0</attribute>
+			<attribute name="pass" type="integer">1</attribute>
+		</record>
+		<record>
+			<attribute name="scheme" type="string"></attribute>
+			<attribute name="device" type="string">/dev/sr0</attribute>
+			<attribute name="mount_point" type="string">/media/cdrom0</attribute>
+			<attribute name="type" type="string">udf,iso9660</attribute>
+			<attribute name="options" type="string">user,noauto</attribute>
+			<attribute name="dump" type="integer">0</attribute>
+			<attribute name="pass" type="integer">0</attribute>
+		</record>
+		<record>
+			<attribute name="scheme" type="string"></attribute>
+			<attribute name="device" type="string">/dev/sde</attribute>
+			<attribute name="mount_point" type="string">/mnt/data</attribute>
+			<attribute name="type" type="string">ext4</attribute>
+			<attribute name="options" type="string">relatime,user_xattr,errors=remount-ro</attribute>
+			<attribute name="dump" type="integer">0</attribute>
+			<attribute name="pass" type="integer">2</attribute>
+		</record>
+		<record>
+			<attribute name="scheme" type="string">UUID</attribute>
+			<attribute name="device" type="string">a2b5f230-a795-4f6f-a39b-9b57686c86d5</attribute>
+			<attribute name="mount_point" type="string">/home</attribute>
+			<attribute name="type" type="string">btrfs</attribute>
+			<attribute name="options" type="string">relatime</attribute>
+			<attribute name="dump" type="integer">0</attribute>
+			<attribute name="pass" type="integer">2</attribute>
+		</record>
+		<record>
+			<attribute name="scheme" type="string"></attribute>
+			<attribute name="device" type="string">/dev/mapper/sdf_crypt</attribute>
+			<attribute name="mount_point" type="string">/mnt/private</attribute>
+			<attribute name="type" type="string">xfs</attribute>
+			<attribute name="options" type="string">relatime</attribute>
+			<attribute name="dump" type="integer">0</attribute>
+			<attribute name="pass" type="integer">2</attribute>
+		</record>
+	</relation>
+</relpipe>