Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: XML to Record generation is wrong for sample with multiple namespaces #42556

Closed
prakanth97 opened this issue Apr 16, 2024 · 2 comments · Fixed by #42589
Closed

[Bug]: XML to Record generation is wrong for sample with multiple namespaces #42556

prakanth97 opened this issue Apr 16, 2024 · 2 comments · Fixed by #42589
Assignees
Labels
Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug
Milestone

Comments

@prakanth97
Copy link
Contributor

Description

XML source:

<bk:book xmlns:bk="http://example.com/book" xmlns:au="http://example.com/author">
        <bk:id>601970</bk:id>
        <bk:title>string</bk:title>
        <au:title>string</au:title>
        <bk:author>string</bk:author>
        <au:author>string</au:author>
</bk:book>

Generated Record:

@xmldata:Name {value: "book"}
@xmldata:Namespace {prefix: "bk", uri: "http://example.com/book"}
type Bk_Book record {
    @xmldata:Namespace {prefix: "bk", uri: "http://example.com/book"}
    int id;
    @xmldata:Namespace {prefix: "bk", uri: "http://example.com/book"}
    string[] title;
    @xmldata:Namespace {prefix: "bk", uri: "http://example.com/book"}
    string[] author;
};

But we have to generate below

@xmldata:Name {value: "book"}
@xmldata:Namespace {prefix: "bk", uri: "http://example.com/book"}
type Bk_Book record {
    @xmldata:Namespace {prefix: "bk", uri: "http://example.com/book"}
    int id;
    @xmldata:Namespace {prefix: "bk", uri: "http://example.com/book"}
    string title;
    @xmldata:Namespace {prefix: "au", uri: "http://example.com/author"}
    @xmldata:Name {value: "title"}
    string title1;
    @xmldata:Namespace {prefix: "bk", uri: "http://example.com/book"}
    string author;
    @xmldata:Name {value: "author"}
    @xmldata:Namespace {prefix: "au", uri: "http://example.com/author"}
    string author1;
};

Steps to Reproduce

No response

Affected Version(s)

2201.9.x

OS, DB, other environment details and versions

No response

Related area

-> Other Area

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added the needTriage The issue has to be inspected and labeled manually label Apr 16, 2024
@prakanth97 prakanth97 removed the needTriage The issue has to be inspected and labeled manually label Apr 16, 2024
@MaryamZi MaryamZi added Team/LanguageServer Language Server Implementation related issues. #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Apr 16, 2024
@mindula mindula added this to the 2201.9.1 milestone May 31, 2024
@mindula
Copy link
Contributor

mindula commented Jun 2, 2024

Copy link

github-actions bot commented Jun 4, 2024

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

@mindula mindula added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Jun 4, 2024
@mindula mindula modified the milestones: 2201.9.1, 2201.9.2 Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants