summaryrefslogtreecommitdiff
path: root/examples/xml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/xml')
-rw-r--r--examples/xml/S0.xml4
-rw-r--r--examples/xml/books.xml15
-rw-r--r--examples/xml/c14n-default-attr.xml3
-rw-r--r--examples/xml/c14n.xml5
-rw-r--r--examples/xml/c14n.xpath4
-rw-r--r--examples/xml/disclaimer.xml6
-rw-r--r--examples/xml/document.xml5
-rw-r--r--examples/xml/entity.xml2
-rw-r--r--examples/xml/external-pe.xml8
-rw-r--r--examples/xml/foo.dtd3
-rw-r--r--examples/xml/foo.xml0
-rw-r--r--examples/xml/malformed.xml4
-rw-r--r--examples/xml/structure.xml14
-rw-r--r--examples/xml/tab-bad.xml21
-rw-r--r--examples/xml/tab-obj.xml21
-rw-r--r--examples/xml/table.xml0
-rw-r--r--examples/xml/unicode.xml12
-rw-r--r--examples/xml/unsorted.xml15
-rw-r--r--examples/xml/xmlstarlet-pad.xml157
-rw-r--r--examples/xml/xmlstarlet-xsa.xml28
20 files changed, 327 insertions, 0 deletions
diff --git a/examples/xml/S0.xml b/examples/xml/S0.xml
new file mode 100644
index 0000000..45d4c54
--- /dev/null
+++ b/examples/xml/S0.xml
@@ -0,0 +1,4 @@
+<doc xmlns="http://www.foo.com/namespaces/my"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<el/>
+</doc>
diff --git a/examples/xml/books.xml b/examples/xml/books.xml
new file mode 100644
index 0000000..f12955b
--- /dev/null
+++ b/examples/xml/books.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<books>
+<begin/>
+<book type='hardback'>
+<title>Atlas Shrugged</title>
+<author>Ayn Rand</author>
+<isbn id='1'>0525934189<br/></isbn>
+</book>
+Next Book
+<book type='paperback'>
+<title>A Burnt-Out Case</title>
+<author>Graham Greene</author>
+<isbn id="2">0140185399<br/></isbn>
+</book>
+</books>
diff --git a/examples/xml/c14n-default-attr.xml b/examples/xml/c14n-default-attr.xml
new file mode 100644
index 0000000..95e2c36
--- /dev/null
+++ b/examples/xml/c14n-default-attr.xml
@@ -0,0 +1,3 @@
+<!DOCTYPE doc [<!ATTLIST doc attr CDATA "default">]>
+<doc/>
+
diff --git a/examples/xml/c14n.xml b/examples/xml/c14n.xml
new file mode 100644
index 0000000..fd8c0a6
--- /dev/null
+++ b/examples/xml/c14n.xml
@@ -0,0 +1,5 @@
+<n0:pdu xmlns:n0='http://a.example.com'>
+<n1:elem1 xmlns:n1='http://b.example'>
+content
+</n1:elem1>
+</n0:pdu>
diff --git a/examples/xml/c14n.xpath b/examples/xml/c14n.xpath
new file mode 100644
index 0000000..38bff9d
--- /dev/null
+++ b/examples/xml/c14n.xpath
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<XPath xmlns:n0="http://a.example.com" xmlns:n1="http://b.example">
+(//. | //@* | //namespace::*)[ancestor-or-self::n1:elem1]
+</XPath>
diff --git a/examples/xml/disclaimer.xml b/examples/xml/disclaimer.xml
new file mode 100644
index 0000000..3abf43c
--- /dev/null
+++ b/examples/xml/disclaimer.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0'?>
+<disclaimer>
+ <p>The opinions represented herein represent those of the individual
+ and should not be interpreted as official policy endorsed by this
+ organization.</p>
+</disclaimer>
diff --git a/examples/xml/document.xml b/examples/xml/document.xml
new file mode 100644
index 0000000..b4f32ec
--- /dev/null
+++ b/examples/xml/document.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0'?>
+<document xmlns:xi="http://www.w3.org/2003/XInclude">
+ <p>120 Mz is adequate for an average home user.</p>
+ <xi:include href="disclaimer.xml"/>
+</document>
diff --git a/examples/xml/entity.xml b/examples/xml/entity.xml
new file mode 100644
index 0000000..dae3383
--- /dev/null
+++ b/examples/xml/entity.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<foo>bar</foo>
diff --git a/examples/xml/external-pe.xml b/examples/xml/external-pe.xml
new file mode 100644
index 0000000..aa82005
--- /dev/null
+++ b/examples/xml/external-pe.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE test [
+<!ELEMENT test (foo)>
+<!ELEMENT foo (#PCDATA)>
+<!ENTITY entity SYSTEM "entity.xml">
+]>
+<!-- Test of external parsed entity. -->
+<test>&entity;</test>
diff --git a/examples/xml/foo.dtd b/examples/xml/foo.dtd
new file mode 100644
index 0000000..36e7dfc
--- /dev/null
+++ b/examples/xml/foo.dtd
@@ -0,0 +1,3 @@
+<!ELEMENT doc ( foo+, bar+ ) >
+<!ELEMENT foo ( #PCDATA ) >
+<!ELEMENT bar ( #PCDATA ) >
diff --git a/examples/xml/foo.xml b/examples/xml/foo.xml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/xml/foo.xml
diff --git a/examples/xml/malformed.xml b/examples/xml/malformed.xml
new file mode 100644
index 0000000..5e90081
--- /dev/null
+++ b/examples/xml/malformed.xml
@@ -0,0 +1,4 @@
+<test_output>
+ <test_name>foo</testname>
+ <subtest>...</subtest>
+</test_output>
diff --git a/examples/xml/structure.xml b/examples/xml/structure.xml
new file mode 100644
index 0000000..c1ec651
--- /dev/null
+++ b/examples/xml/structure.xml
@@ -0,0 +1,14 @@
+<a1>
+ <a11>
+ <a111>
+ <a1111/>
+ </a111>
+ <a112>
+ <a1121/>
+ </a112>
+ </a11>
+ <a12/>
+ <a13>
+ <a131/>
+ </a13>
+</a1>
diff --git a/examples/xml/tab-bad.xml b/examples/xml/tab-bad.xml
new file mode 100644
index 0000000..adb05a8
--- /dev/null
+++ b/examples/xml/tab-bad.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<xml>
+ <table>
+ <rec id="1">
+ <numField>123</numField>
+ <stringField>String Value</stringField>
+ <object name="Obj1">
+ <property name="size">10</property>
+ <property name="type">Data</property>
+ </object>
+ </rec>
+ <rec id="2">
+ <numField>346</numField>
+ <stringField>Text Value</stringField>
+ </rec>
+ <rec id="3">
+ <numField>-23</numField>
+ <stringField>stringValue</stringField>
+ </rec>
+ </tble>
+</xml>
diff --git a/examples/xml/tab-obj.xml b/examples/xml/tab-obj.xml
new file mode 100644
index 0000000..1f0383d
--- /dev/null
+++ b/examples/xml/tab-obj.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<xml>
+ <table>
+ <rec id="1">
+ <numField>123</numField>
+ <stringField>String Value</stringField>
+ <object name="Obj1">
+ <property name="size">10</property>
+ <property name="type">Data</property>
+ </object>
+ </rec>
+ <rec id="2">
+ <numField>346</numField>
+ <stringField>Text Value</stringField>
+ </rec>
+ <rec id="3">
+ <numField>-23</numField>
+ <stringField>stringValue</stringField>
+ </rec>
+ </table>
+</xml>
diff --git a/examples/xml/table.xml b/examples/xml/table.xml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/xml/table.xml
diff --git a/examples/xml/unicode.xml b/examples/xml/unicode.xml
new file mode 100644
index 0000000..618bfef
--- /dev/null
+++ b/examples/xml/unicode.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE doc [
+ <!ELEMENT doc (test+)>
+ <!ELEMENT test (#PCDATA)>
+ <!ENTITY ccedil "&#231;">
+ <!ATTLIST test lang CDATA #IMPLIED>
+]>
+<doc>
+ <test lang="français">UTF-8 character.</test>
+ <test lang="fran&#231;ais">numeric ref.</test>
+ <test lang="fran&ccedil;ais">entity ref.</test>
+</doc>
diff --git a/examples/xml/unsorted.xml b/examples/xml/unsorted.xml
new file mode 100644
index 0000000..6ab629e
--- /dev/null
+++ b/examples/xml/unsorted.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<root>
+ <!-- rank 1 is vowel, rank 2 is consonant -->
+ <elem name="c" rank="2"/>
+ <elem name="e" rank="1"/>
+ <elem name="a" rank="1"/>
+ <elem name="d" rank="2"/>
+ <elem name="b" rank="2"/>
+
+ <elem name="B" rank="2"/>
+ <elem name="A" rank="1"/>
+ <elem name="D" rank="2"/>
+ <elem name="E" rank="1"/>
+ <elem name="C" rank="2"/>
+</root>
diff --git a/examples/xml/xmlstarlet-pad.xml b/examples/xml/xmlstarlet-pad.xml
new file mode 100644
index 0000000..9324575
--- /dev/null
+++ b/examples/xml/xmlstarlet-pad.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="Windows-1252" ?>
+<XML_DIZ_INFO>
+<MASTER_PAD_VERSION_INFO>
+ <MASTER_PAD_VERSION>1.15</MASTER_PAD_VERSION>
+ <MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://www.asp-shareware.org/pad</MASTER_PAD_INFO>
+</MASTER_PAD_VERSION_INFO>
+<Company_Info>
+ <Company_Name>Mikhail Grushinskiy</Company_Name>
+ <Address_1 />
+ <Address_2 />
+ <City_Town />
+ <State_Province />
+ <Zip_Postal_Code />
+ <Country />
+ <Company_WebSite_URL>http://sourceforge.net/projects/xmlstar/</Company_WebSite_URL>
+<Contact_Info>
+ <Author_First_Name>Mikhail</Author_First_Name>
+ <Author_Last_Name>Grushinskiy</Author_Last_Name>
+ <Author_Email>mgrouch@users.sourceforge.net</Author_Email>
+ <Contact_First_Name />
+ <Contact_Last_Name />
+ <Contact_Email />
+ </Contact_Info>
+<Support_Info>
+ <Sales_Email />
+ <Support_Email />
+ <General_Email>mgrouch@users.sourceforge.net</General_Email>
+ <Sales_Phone />
+ <Support_Phone />
+ <General_Phone />
+ <Fax_Phone />
+ </Support_Info>
+</Company_Info>
+<Program_Info>
+ <Program_Name>xmlstarlet</Program_Name>
+ <Program_Version>0.3.0</Program_Version>
+ <Program_Release_Month>05</Program_Release_Month>
+ <Program_Release_Day>28</Program_Release_Day>
+ <Program_Release_Year>2003</Program_Release_Year>
+ <Program_Cost_Dollars />
+ <Program_Cost_Other_Code />
+ <Program_Cost_Other />
+ <Program_Type>Freeware</Program_Type>
+ <Program_Release_Status>Major Update</Program_Release_Status>
+ <Program_Install_Support>Install and Uninstall</Program_Install_Support>
+ <Program_OS_Support>Unix,Linux</Program_OS_Support>
+ <Program_Language>English</Program_Language>
+<File_Info>
+ <Filename_Versioned>xmlstarlet-0.3.0.tar.gz</Filename_Versioned>
+ <Filename_Previous />
+ <Filename_Generic />
+ <Filename_Long />
+ <File_Size_Bytes>155073</File_Size_Bytes>
+ <File_Size_K>151</File_Size_K>
+ <File_Size_MB>0.15</File_Size_MB>
+ </File_Info>
+<Expire_Info>
+ <Has_Expire_Info>N</Has_Expire_Info>
+ <Expire_Count />
+ <Expire_Based_On>Days</Expire_Based_On>
+ <Expire_Other_Info />
+ <Expire_Month />
+ <Expire_Day />
+ <Expire_Year />
+ </Expire_Info>
+ <Program_Change_Info />
+ <Program_Specific_Category>Utilities</Program_Specific_Category>
+ <Program_Categories>Development Tools</Program_Categories>
+ <Program_System_Requirements>POSIX UNIX</Program_System_Requirements>
+ <Includes_JAVA_VM>N</Includes_JAVA_VM>
+ <Includes_VB_Runtime>N</Includes_VB_Runtime>
+ <Includes_DirectX>N</Includes_DirectX>
+</Program_Info>
+<Program_Descriptions>
+<English>
+ <Keywords>xmlstarlet XML command line processing tool utility toolkit XSLT XSD RelaxNG validate query transform edit modify shell UNIX grep diff sed pyx</Keywords>
+ <Char_Desc_45>XMLStarlet Command Line XML Toolkit</Char_Desc_45>
+ <Char_Desc_80>XMLStarlet Command Line XML Toolkit</Char_Desc_80>
+ <Char_Desc_250>XMLStarlet is a set of command line utilities (tools) to transform, query, validate, and edit XML documents and files using simple set of shell commands in similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc</Char_Desc_250>
+ <Char_Desc_450>XMLStarlet is a set of command line utilities (tools) to transform, query, validate, and edit XML documents and files using simple set of shell commands in similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc commands.
+
+This set of command line utilities can be used by those who deal with many XML documents on UNIX shell command prompt as well as for automated XML processing with shell scripts.</Char_Desc_450>
+ <Char_Desc_2000>XMLStarlet is a set of command line utilities (tools) to transform, query, validate, and edit XML documents and files using simple set of shell commands in similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc commands.
+
+This set of command line utilities can be used by those who deal with many XML documents on UNIX shell command prompt as well as for automated XML processing with shell scripts.
+
+The toolkit's feature set includes options to:
+
+Check or validate XML files (simple well-formedness check, DTD, XSD, RelaxNG)
+
+Calculate values of XPath expressions on XML files (such as running sums, etc)
+
+Search XML files for matches to given XPath expressions
+
+Apply XSLT stylesheets to XML documents (including EXSLT support, and passing parameters to stylesheets)
+
+Query XML documents (ex. query for value of some elements of attributes, sorting, etc)
+
+Modify or edit XML documents (ex. delete some elements)
+
+Format or &quot;beautify&quot; XML documents (as changing indentation, etc)
+
+Fetch XML documents using http:// or ftp:// URLs
+
+Browse tree structure of XML documents (in similar way to 'ls' command for directories)
+
+Include one XML document into another using XInclude
+
+XML c14n canonicalization
+
+Escape/unescape special XML characters in input text
+
+Display directories in XML format
+
+XMLStarlet is open source freeware under MIT license which allows free use and distribution for both commercial and non-commercial projects.
+
+We welcome any user's feedback on this project which would greatly help us to improve its quality. Comments, suggestions, feature requests, bug reports can be done via SourceForge project web site (see XMLStarlet Sourceforge forums at http://sourceforge.net/forum/?group_id=66612, or XMLStarlet mailing list at http://lists.sourceforge.net/lists/listinfo/xmlstar-devel)</Char_Desc_2000>
+</English>
+</Program_Descriptions>
+<Web_Info>
+<Application_URLs>
+ <Application_Info_URL>http://xmlstar.sourceforge.net/</Application_Info_URL>
+ <Application_Order_URL>http://xmlstar.sourceforge.net/download.php</Application_Order_URL>
+ <Application_Screenshot_URL />
+ <Application_Icon_URL>http://xmlstar.sourceforge.net/img/xmlstarlet.png</Application_Icon_URL>
+ <Application_XML_File_URL />
+ </Application_URLs>
+<Download_URLs>
+ <Primary_Download_URL>http://xmlstar.sourceforge.net/download.php</Primary_Download_URL>
+ <Secondary_Download_URL>http://sourceforge.net/project/showfiles.php?group_id=66612</Secondary_Download_URL>
+ <Additional_Download_URL_1 />
+ <Additional_Download_URL_2 />
+ </Download_URLs>
+</Web_Info>
+<Permissions>
+ <Distribution_Permissions>Copyright (c) 2002,2003 Mikhail Grushinskiy. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the &quot;Software&quot;), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.</Distribution_Permissions>
+ <EULA />
+</Permissions>
+</XML_DIZ_INFO>
diff --git a/examples/xml/xmlstarlet-xsa.xml b/examples/xml/xmlstarlet-xsa.xml
new file mode 100644
index 0000000..698f09a
--- /dev/null
+++ b/examples/xml/xmlstarlet-xsa.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsa PUBLIC "-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML"
+ "http://www.garshol.priv.no/download/xsa/xsa.dtd">
+
+<xsa>
+ <vendor>
+ <name>Mikhail Grushinskiy</name>
+ <email>mgrouch@users.sourceforge.net</email>
+ <url>http://xmlstar.sourceforge.net/</url>
+ </vendor>
+
+ <product id="xmlstarlet">
+ <name>xmlstarlet</name>
+ <version>0.3.0</version>
+ <last-release>20030528</last-release>
+ <info-url>http://xmlstar.sourceforge.net/</info-url>
+ <changes>
+Changes since 0.2.0
+1. Many improvements to 'edit' option
+2. Improvements for namespaces support in 'select' option
+3. Fixes for 'ls' option
+4. New binaries for Solaris8-sparc/RedHat-7.3/Mandrake-9.1/
+5. Documentation and web site updates
+6. Improved build scripts and make files
+7. Additional examples and tests
+ </changes>
+ </product>
+</xsa>