-
Notifications
You must be signed in to change notification settings - Fork 755
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 #43057 from mindula/remove_default_namespaces_master
[Master] Remove adding default namespaces in xml to record generation
- Loading branch information
Showing
10 changed files
with
263 additions
and
17 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
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
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
37 changes: 37 additions & 0 deletions
37
misc/xml-to-record-converter/src/test/resources/ballerina/sample_35.bal
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 @@ | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example2.com" | ||
} | ||
type Ns2_Person record { | ||
int __text; | ||
@xmldata:Attribute | ||
string age; | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example2.com" | ||
} | ||
@xmldata:Attribute | ||
string name; | ||
}; | ||
|
||
type Data record { | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example2.com" | ||
} | ||
Ns2_Person Person; | ||
@xmldata:Namespace { | ||
uri: "example.com" | ||
} | ||
string Message; | ||
}; | ||
|
||
@xmldata:Namespace { | ||
uri: "example.com" | ||
} | ||
type AQ record { | ||
@xmldata:Namespace { | ||
uri: "example.com" | ||
} | ||
Data Data; | ||
}; |
63 changes: 63 additions & 0 deletions
63
misc/xml-to-record-converter/src/test/resources/ballerina/sample_36.bal
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,63 @@ | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example3.com" | ||
} | ||
type Ns2_Person record { | ||
int __text; | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example2.com" | ||
} | ||
@xmldata:Attribute | ||
string age; | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example2.com" | ||
} | ||
@xmldata:Attribute | ||
string name; | ||
}; | ||
|
||
type Ns1_Details record { | ||
@xmldata:Namespace { | ||
prefix: "ns1", | ||
uri: "example1.com" | ||
} | ||
string Info; | ||
@xmldata:Namespace { | ||
prefix: "ns1", | ||
uri: "example1.com" | ||
} | ||
string Status; | ||
}; | ||
|
||
type Data record { | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example2.com" | ||
} | ||
Ns2_Person Person; | ||
@xmldata:Namespace { | ||
uri: "example.com" | ||
} | ||
string C; | ||
@xmldata:Namespace { | ||
prefix: "ns1", | ||
uri: "example1.com" | ||
} | ||
Ns1_Details Details; | ||
@xmldata:Namespace { | ||
uri: "example.com" | ||
} | ||
string B; | ||
}; | ||
|
||
@xmldata:Namespace { | ||
uri: "example.com" | ||
} | ||
type Test record { | ||
@xmldata:Namespace { | ||
uri: "example.com" | ||
} | ||
Data Data; | ||
}; |
63 changes: 63 additions & 0 deletions
63
misc/xml-to-record-converter/src/test/resources/ballerina/sample_37.bal
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,63 @@ | ||
@xmldata:Namespace { | ||
prefix: "ns1", | ||
uri: "example3.com" | ||
} | ||
type Ns1_Person record { | ||
int __text; | ||
@xmldata:Attribute | ||
string age; | ||
@xmldata:Attribute | ||
string city; | ||
@xmldata:Namespace { | ||
prefix: "ns1", | ||
uri: "example1.com" | ||
} | ||
@xmldata:Attribute | ||
string name; | ||
}; | ||
|
||
type Ns2_Details record { | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example.com" | ||
} | ||
string Info; | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example.com" | ||
} | ||
string Status; | ||
@xmldata:Attribute | ||
string number; | ||
}; | ||
|
||
type Data record { | ||
@xmldata:Namespace { | ||
prefix: "ns1", | ||
uri: "example1.com" | ||
} | ||
Ns1_Person Person; | ||
@xmldata:Namespace { | ||
uri: "example2.com" | ||
} | ||
string Name; | ||
@xmldata:Namespace { | ||
prefix: "ns2", | ||
uri: "example.com" | ||
} | ||
Ns2_Details Details; | ||
@xmldata:Namespace { | ||
uri: "example2.com" | ||
} | ||
string Description; | ||
}; | ||
|
||
@xmldata:Namespace { | ||
uri: "example2.com" | ||
} | ||
type Countries record { | ||
@xmldata:Namespace { | ||
uri: "example2.com" | ||
} | ||
Data Data; | ||
}; |
12 changes: 12 additions & 0 deletions
12
misc/xml-to-record-converter/src/test/resources/ballerina/sample_9.bal
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
6 changes: 6 additions & 0 deletions
6
misc/xml-to-record-converter/src/test/resources/xml/sample_35.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 @@ | ||
<AQ xmlns="example.com"> | ||
<Data xmlns:ns1="example1.com" xmlns:ns2="example2.com"> | ||
<ns2:Person xmlns="example2.com" ns2:name="John" age="25">1</ns2:Person> | ||
<Message>Test</Message> | ||
</Data> | ||
</AQ> |
11 changes: 11 additions & 0 deletions
11
misc/xml-to-record-converter/src/test/resources/xml/sample_36.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,11 @@ | ||
<Test xmlns="example.com"> | ||
<Data xmlns:ns1="example1.com" xmlns:ns2="example2.com"> | ||
<ns2:Person xmlns="example3.com" ns2:name="Alice" ns2:age="30">2</ns2:Person> | ||
<C>Example</C> | ||
<ns1:Details> | ||
<ns1:Info>Additional Info</ns1:Info> | ||
<ns1:Status>Active</ns1:Status> | ||
</ns1:Details> | ||
<B>Sample</B> | ||
</Data> | ||
</Test> |
11 changes: 11 additions & 0 deletions
11
misc/xml-to-record-converter/src/test/resources/xml/sample_37.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,11 @@ | ||
<Countries xmlns="example2.com"> | ||
<Data xmlns:ns2="example.com" xmlns:ns1="example1.com"> | ||
<ns1:Person xmlns="example3.com" ns1:name="Emily" age="32" city="New York">2</ns1:Person> | ||
<Name>Data Sample</Name> | ||
<ns2:Details number="1234"> | ||
<ns2:Info>Additional Information</ns2:Info> | ||
<ns2:Status>Active</ns2:Status> | ||
</ns2:Details> | ||
<Description>Sample Text</Description> | ||
</Data> | ||
</Countries> |