Closed dbolene closed 13 years ago
You are absolutely right. The whole issue of unqualified local elements have slipped my mind. The relevant part from the XML Schema spec is XML Representation of Element Declaration Schema Components:
{target namespace}
If
form
is present and its actual value isqualified
, or ifform
is absent and the actual value ofelementFormDefault
on the<schema>
ancestor isqualified
, then the actual value of thetargetNamespace
[attribute] of the parent<schema>
element information item, or absent if there is none, otherwise absent.
Since the default value of elemeFormDefault
is unqualified
, unless otherwise specified the local elements must be unqualified. Schemas like XML Schema and XHTML specify this value to qualified
, but this is a defect of scalaxb not handling form correctly.
Implemented support for elementFormDefault
and form
. https://github.com/eed3si9n/scalaxb/commit/303fee6651b8c0cb21a4d24f0fe35ab60b7e9c00
I'm not an XML expert (by choice :-) but isn't it legal to not have a default ns attribute like
xmlns="someNameSpace"
at the root but instead something like:"xmlns:nsname="someNameSpace"
and then prefix the root element with<nsname:RootElement>...</nsname:RootElement>
?scalaxb can't seem to handle this
A full example: