-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from SasinduDilshara/fix_toxml_issues
Add namespace awareness for validating xml against xsd files
- Loading branch information
Showing
29 changed files
with
402 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/ns" xmlns="http://example.com/ns" elementFormDefault="qualified"> | ||
<xs:element name="profile"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="name" type="xs:string"/> | ||
<xs:element name="age" type="xs:int"/> | ||
<xs:element name="bio" type="xs:string"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
targetNamespace="http://example.com/ns1" | ||
xmlns="http://example.com/ns1" | ||
xmlns:ns2="http://example.com/ns2" | ||
xmlns:ns3="http://example.com/ns3" | ||
elementFormDefault="qualified"> | ||
|
||
<!-- Import schemas from ns2 and ns3 --> | ||
<xs:import namespace="http://example.com/ns2" schemaLocation="TestCase2.xsd"/> | ||
<xs:import namespace="http://example.com/ns3" schemaLocation="TestCase3.xsd"/> | ||
|
||
<!-- Define the complexType for book --> | ||
<xs:complexType name="bookType"> | ||
<xs:sequence> | ||
<xs:element name="title" type="xs:string"/> | ||
<xs:element name="author" type="xs:string"/> | ||
<xs:element name="price" type="xs:decimal"/> | ||
<xs:element name="publisher" type="xs:string"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
|
||
<!-- Define the complexType for library --> | ||
<xs:complexType name="libraryType"> | ||
<xs:sequence> | ||
<xs:element name="book" maxOccurs="unbounded" type="bookType"/> | ||
<xs:element name="location" type="xs:string"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
|
||
<!-- Define the 'book' element using the bookType complexType --> | ||
<xs:element name="book" type="bookType"/> | ||
|
||
<!-- Define the 'library' element using the libraryType complexType --> | ||
<xs:element name="library" type="libraryType"/> | ||
|
||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
targetNamespace="http://example.com/ns2" | ||
xmlns="http://example.com/ns2" | ||
xmlns:ns1="http://example.com/ns1" | ||
xmlns:ns3="http://example.com/ns3" | ||
elementFormDefault="qualified"> | ||
|
||
<xs:import namespace="http://example.com/ns1" schemaLocation="TestCase1.xsd"/> | ||
<xs:import namespace="http://example.com/ns3" schemaLocation="TestCase3.xsd"/> | ||
|
||
<xs:element name="authorDetails"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="firstName" type="xs:string"/> | ||
<xs:element name="lastName" type="xs:string"/> | ||
<xs:element name="age" type="xs:int"/> | ||
<xs:element name="books" maxOccurs="unbounded"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="bookTitle" type="xs:string"/> | ||
<xs:element name="bookPrice" type="xs:decimal"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
|
||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
targetNamespace="http://example.com/ns3" | ||
xmlns="http://example.com/ns3" | ||
xmlns:ns1="http://example.com/ns1" | ||
xmlns:ns2="http://example.com/ns2" | ||
elementFormDefault="qualified"> | ||
|
||
<xs:import namespace="http://example.com/ns1" schemaLocation="TestCase1.xsd"/> | ||
<xs:import namespace="http://example.com/ns2" schemaLocation="TestCase2.xsd"/> | ||
|
||
<xs:element name="store"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="storeName" type="xs:string"/> | ||
<xs:element name="location" type="xs:string"/> | ||
<xs:element name="inventory"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="item" maxOccurs="unbounded"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="itemName" type="xs:string"/> | ||
<xs:element name="itemPrice" type="xs:decimal"/> | ||
<xs:element name="itemQuantity" type="xs:int"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/ns" xmlns="http://example.com/ns" elementFormDefault="qualified"> | ||
<xs:element name="book"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="title" type="xs:string"/> | ||
<xs:element name="author" type="xs:string"/> | ||
<xs:element name="price" type="xs:decimal"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/ns" xmlns="http://example.com/ns" elementFormDefault="qualified"> | ||
<xs:element name="order"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="orderId" type="xs:int"/> | ||
<xs:element name="customerName" type="xs:string"/> | ||
<xs:element name="totalAmount" type="xs:decimal"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/ns" xmlns="http://example.com/ns" elementFormDefault="qualified"> | ||
<xs:element name="address"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="street" type="xs:string"/> | ||
<xs:element name="city" type="xs:string"/> | ||
<xs:element name="zipcode" type="xs:string"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/ns" xmlns="http://example.com/ns" elementFormDefault="qualified"> | ||
<xs:element name="invoice"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="invoiceNumber" type="xs:string"/> | ||
<xs:element name="invoiceDate" type="xs:date"/> | ||
<xs:element name="amount" type="xs:decimal"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
6 changes: 6 additions & 0 deletions
6
ballerina/tests/resources/xsd_tests/xml_values/schema_10_invalid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<profile> | ||
<name>John Doe</name> | ||
<age>30</age> | ||
<bio>Software Developer</bio> | ||
</profile> |
6 changes: 6 additions & 0 deletions
6
ballerina/tests/resources/xsd_tests/xml_values/schema_10_valid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<profile xmlns="http://example.com/ns"> | ||
<name>John Doe</name> | ||
<age>30</age> | ||
<bio>Software Developer</bio> | ||
</profile> |
16 changes: 16 additions & 0 deletions
16
ballerina/tests/resources/xsd_tests/xml_values/schema_11_invalid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<library> | ||
<book> | ||
<title>XML for Beginners</title> | ||
<author>John Doe</author> | ||
<price>19.99</price> | ||
<publisher>XYZ Publishers</publisher> | ||
</book> | ||
<book> | ||
<title>Advanced XML</title> | ||
<author>Jane Smith</author> | ||
<price>29.99</price> | ||
<publisher>ABC Publishers</publisher> | ||
</book> | ||
<location>Main Branch</location> | ||
</library> |
16 changes: 16 additions & 0 deletions
16
ballerina/tests/resources/xsd_tests/xml_values/schema_11_invalid_xml_2.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<library xmlns="http://example.com/ns1" xmlns:ns2="http://example.com/ns2" xmlns:ns3="http://example.com/ns3"> | ||
<book> | ||
<title>XML for Beginners</title> | ||
<author>John Doe</author> | ||
<price>19.99</price> | ||
<publisher>XYZ Publishers</publisher> | ||
</book> | ||
<book> | ||
<title>Advanced XML</title> | ||
<author>Jane Smith</author> | ||
<price>29.99</price> | ||
<publisher>ABC Publishers</publisher> | ||
</book> | ||
<location xmlns="http://example.com/ns2">Main Branch</location> <!-- Wrong namespace for 'location' --> | ||
</library> |
16 changes: 16 additions & 0 deletions
16
ballerina/tests/resources/xsd_tests/xml_values/schema_11_valid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<library xmlns="http://example.com/ns1" xmlns:ns2="http://example.com/ns2" xmlns:ns3="http://example.com/ns3"> | ||
<book> | ||
<title>XML for Beginners</title> | ||
<author>John Doe</author> | ||
<price>19.99</price> | ||
<publisher>XYZ Publishers</publisher> | ||
</book> | ||
<book> | ||
<title>Advanced XML</title> | ||
<author>Jane Smith</author> | ||
<price>29.99</price> | ||
<publisher>ABC Publishers</publisher> | ||
</book> | ||
<location>Main Branch</location> | ||
</library> |
14 changes: 14 additions & 0 deletions
14
ballerina/tests/resources/xsd_tests/xml_values/schema_12_invalid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<authorDetails> | ||
<firstName>John</firstName> | ||
<lastName>Doe</lastName> | ||
<age>45</age> | ||
<books> | ||
<bookTitle>XML for Beginners</bookTitle> | ||
<bookPrice>19.99</bookPrice> | ||
</books> | ||
<books> | ||
<bookTitle>Advanced XML</bookTitle> | ||
<bookPrice>29.99</bookPrice> | ||
</books> | ||
</authorDetails> |
14 changes: 14 additions & 0 deletions
14
ballerina/tests/resources/xsd_tests/xml_values/schema_12_invalid_xml_2.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<authorDetails xmlns="http://example.com/ns2" xmlns:ns1="http://example.com/ns1" xmlns:ns3="http://example.com/ns3"> | ||
<firstName>John</firstName> | ||
<lastName>Doe</lastName> | ||
<age>45</age> | ||
<books xmlns="http://example.com/ns1"> | ||
<bookTitle>XML for Beginners</bookTitle> | ||
<bookPrice>19.99</bookPrice> | ||
</books> | ||
<books xmlns="http://example.com/ns1"> | ||
<bookTitle>Advanced XML</bookTitle> | ||
<bookPrice>29.99</bookPrice> | ||
</books> | ||
</authorDetails> |
14 changes: 14 additions & 0 deletions
14
ballerina/tests/resources/xsd_tests/xml_values/schema_12_valid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<authorDetails xmlns="http://example.com/ns2" xmlns:ns1="http://example.com/ns1" xmlns:ns3="http://example.com/ns3"> | ||
<firstName>John</firstName> | ||
<lastName>Doe</lastName> | ||
<age>45</age> | ||
<books> | ||
<bookTitle>XML for Beginners</bookTitle> | ||
<bookPrice>19.99</bookPrice> | ||
</books> | ||
<books> | ||
<bookTitle>Advanced XML</bookTitle> | ||
<bookPrice>29.99</bookPrice> | ||
</books> | ||
</authorDetails> |
17 changes: 17 additions & 0 deletions
17
ballerina/tests/resources/xsd_tests/xml_values/schema_13_invalid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<store> | ||
<storeName>SuperMart</storeName> | ||
<location>New York</location> | ||
<inventory> | ||
<item> | ||
<itemName>Apple</itemName> | ||
<itemPrice>1.25</itemPrice> | ||
<itemQuantity>100</itemQuantity> | ||
</item> | ||
<item> | ||
<itemName>Banana</itemName> | ||
<itemPrice>0.75</itemPrice> | ||
<itemQuantity>150</itemQuantity> | ||
</item> | ||
</inventory> | ||
</store> |
17 changes: 17 additions & 0 deletions
17
ballerina/tests/resources/xsd_tests/xml_values/schema_13_invalid_xml_2.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<store xmlns="http://example.com/ns3" xmlns:ns1="http://example.com/ns1" xmlns:ns2="http://example.com/ns2"> | ||
<storeName>SuperMart</storeName> | ||
<location>New York</location> | ||
<inventory> | ||
<item xmlns="http://example.com/ns1"> | ||
<itemName>Apple</itemName> | ||
<itemPrice>1.25</itemPrice> | ||
<itemQuantity>100</itemQuantity> | ||
</item> | ||
<item xmlns="http://example.com/ns1"> | ||
<itemName>Banana</itemName> | ||
<itemPrice>0.75</itemPrice> | ||
<itemQuantity>150</itemQuantity> | ||
</item> | ||
</inventory> | ||
</store> |
17 changes: 17 additions & 0 deletions
17
ballerina/tests/resources/xsd_tests/xml_values/schema_13_valid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<store xmlns="http://example.com/ns3" xmlns:ns1="http://example.com/ns1" xmlns:ns2="http://example.com/ns2"> | ||
<storeName>SuperMart</storeName> | ||
<location>New York</location> | ||
<inventory> | ||
<item> | ||
<itemName>Apple</itemName> | ||
<itemPrice>1.25</itemPrice> | ||
<itemQuantity>100</itemQuantity> | ||
</item> | ||
<item> | ||
<itemName>Banana</itemName> | ||
<itemPrice>0.75</itemPrice> | ||
<itemQuantity>150</itemQuantity> | ||
</item> | ||
</inventory> | ||
</store> |
5 changes: 5 additions & 0 deletions
5
ballerina/tests/resources/xsd_tests/xml_values/schema_6_invalid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<book xmlns="http://example.com/ns"> | ||
<title>XML for Beginners</title> | ||
<price>29.99</price> | ||
</book> |
6 changes: 6 additions & 0 deletions
6
ballerina/tests/resources/xsd_tests/xml_values/schema_6_valid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<book xmlns="http://example.com/ns"> | ||
<title>XML for Beginners</title> | ||
<author>John Doe</author> | ||
<price>29.99</price> | ||
</book> |
6 changes: 6 additions & 0 deletions
6
ballerina/tests/resources/xsd_tests/xml_values/schema_7_invalid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Missing orderId --> | ||
<order xmlns="http://example.com/ns"> | ||
<customerName>Jane Doe</customerName> | ||
<totalAmount>100.50</totalAmount> | ||
</order> |
7 changes: 7 additions & 0 deletions
7
ballerina/tests/resources/xsd_tests/xml_values/schema_7_valid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- This is an order --> | ||
<order xmlns="http://example.com/ns"> | ||
<orderId>12345</orderId> | ||
<customerName>Jane Doe</customerName> | ||
<totalAmount>100.50</totalAmount> | ||
</order> |
5 changes: 5 additions & 0 deletions
5
ballerina/tests/resources/xsd_tests/xml_values/schema_8_invalid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<address xmlns="http://example.com/ns"> | ||
<street>123 Elm Street</street> | ||
<zipcode>98765</zipcode> | ||
</address> |
6 changes: 6 additions & 0 deletions
6
ballerina/tests/resources/xsd_tests/xml_values/schema_8_valid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<address xmlns="http://example.com/ns"> | ||
<street> 123 Elm Street </street> | ||
<city> Springfield </city> | ||
<zipcode> 98765 </zipcode> | ||
</address> |
6 changes: 6 additions & 0 deletions
6
ballerina/tests/resources/xsd_tests/xml_values/schema_9_invalid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Missing amount element --> | ||
<invoice xmlns="http://example.com/ns"> | ||
<invoiceNumber>INV123</invoiceNumber> | ||
<invoiceDate>2024-02-25</invoiceDate> | ||
</invoice> |
7 changes: 7 additions & 0 deletions
7
ballerina/tests/resources/xsd_tests/xml_values/schema_9_valid_xml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Invoice details --> | ||
<invoice xmlns="http://example.com/ns"> | ||
<invoiceNumber>INV123</invoiceNumber> | ||
<invoiceDate>2024-02-25</invoiceDate> | ||
<amount>250.75</amount> | ||
</invoice> |
Oops, something went wrong.