Skip to content

make the default xmlns declaration optional #28849

@StephaneDelcroix

Description

@StephaneDelcroix

Description

Allow this kind of XAML

<ContentPage>
     <Label />
</ContentPage>

instead of

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui">
    <Label />
</ContentPage>

The default xmlns will be, of course, not that one, but the global as defined in #28847

This is NOT invalid XML. It's an invalid xml DOCUMENT, but it's a valid xml FRAGMENT. All the tools used for parsing xml will keep working, provided the default xmlns is fed into the parser.

This is an OPT-IN feature, and you can choose to use it or not. if you define a default xmlns, it will be used.

(Public) API Changes

none

Usage Scenarios

/

Backward Compatibility

/

Difficulty

Low

Metadata

Metadata

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions