Professional Documents
Culture Documents
Samples
Samples
xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/XSL" href="invenstyle.xsl"?>
<inventory>
<product>
<name>Monitor</name>
<id>1001</id>
<price>20000</price>
<total_stock>5000</total_stock>
<sold>2647</sold>
</product>
<product>
<name>Keyboard</name>
<id>1002</id>
<price>600</price>
<total_stock>8500</total_stock>
<sold>6298</sold>
</product>
<product>
<name>Mouse</name>
<id>1003</id>
<price>200</price>
<total_stock>1000</total_stock>
<sold>123</sold>
</product>
<product>
<name>CPU</name>
<id>1004</id>
<price>15000</price>
<total_stock>6000</total_stock>
<sold>1687</sold>
</product>
<product>
<name>Printer</name>
<id>1005</id>
<price>6000</price>
<total_stock>2000</total_stock>
<sold>568</sold>
</product>
</inventory>
invenstyle.xslt
invenschema.xs
<?xml version="0.1"?>
<xs:schema>
<xs:element name="inventory">
<xs:element name="product">
<xs:complextype>
<xs:sequence>
<xs:element name="name" type="xs:string">
<xs:element name="id" type="xs:integer">
<xs:element name="price" type="xs:float">
<xs:element name="total_stock" type="xs:integer">
<xs:element name="sold" type="xs:integer">
</xs:sequence>
</xs:complextype>
</xs:element>
</xs:element>
</xs:schema>
inven.dtd
<!DOCTYPE inventory
[
<!ELEMENT inventory (product)>
<!ELEMENT product (name,id,price,total_stock,sold)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT total_stock (#PCDATA)>
<!ELEMENT sold (#PCDATA)>
]>