microsoft / microsoft/typespec
Xml Default Namespace
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
As part of xml basic design #2970 we don't support default `xmlns`. This can be quite problematic so moving into a different issue
```xml
abc
abc
```
Here:
- `Book` belongs to `https://example.com/ns1`
- `id` belongs to `https://example.com/ns2`
- `name` belongs to `https://example.com/ns1`
```tsp
@defaultNamespace("https://geo-json.com")
namespace GeoJson {
model Point {
x: string;
y: string;
}
}
@defaultNamespace("https://my-service.com")
namespace MyService {
model Foo {
loc: GeoJson.Point;
myLoc: MyPoint;
}
model MyPoint {
...GeoJson.Point;
}
}
```
```xml
1
1
1
1
```
Contributor guide
Assessment
This issue has not been assessed yet.