Java Reference
In-Depth Information
What you can't do is just prefix your elements and expect Trang to provide some boilerplate
defaults. This, for example, won't cut it:
<a:address>
<a:street>1212 Some Street</a:street>
<a:city>Washington,DC</a:city>
<a:state>VA</a:state>
</a:address>
The answer is clear and simple. You just need to provide a namespace definition for the prefix,
and then use Trang normally, as you did in the previous example:
<a:address xmlns:a="urn:ns:soacookbook:address" >
<a:street>1212 Some Street</a:street>
<a:city>Washington,DC</a:city>
<a:state>VA</a:state>
</a:address>
Doing this will give you a new XSD document named for each prefix you define.
See Also
Validating an XML Document Against Multiple Schemas .
Search WWH ::




Custom Search