default scope no longer outputs default namespace binding #91

Closed
eed3si9n opened this Issue Oct 11, 2011 · 0 comments

Comments

Projects
None yet
1 participant
@eed3si9n
Owner

eed3si9n commented Oct 11, 2011

originally reported by @martiell

steps

  1. compile usaddress.xsd in running scalaxb
  2. use it as follows:
val subject = <shipTo xmlns="http://www.example.com/IPO">
  <name>Foo</name>
  <street>1537 Paper Street</street>
  <city>Wilmington</city>
</shipTo>

val shipTo = scalaxb.fromXML[ipo.Address](subject)
val document = scalaxb.toXML[ipo.Address](shipTo.copy(name = "Bar"), None, Some("foo"), ipo.defaultScope)

problem

Inner elements are prefixed with ipo.

<foo xmlns:ipo="http://www.example.com/IPO"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <ipo:name>Bar</ipo:name>
   <ipo:street>1537 Paper Street</ipo:street>
   <ipo:city>Wilmington</ipo:city>
</foo>

expectation

The default scope includes default namespace, which points to "http://www.example.com/IPO".

@eed3si9n eed3si9n closed this in 4fe01fe Oct 12, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment