[xsd-users] Reading from istream

Boris Kolpackov boris at codesynthesis.com
Fri May 12 09:57:29 EDT 2006


Hi David,

Moss, David R (SELEX Comms) (UK Christchurch) <david.r.moss at selex-comm.com> writes:

> > The easiest
> > way to achieve what you want (especially if you want the fragment to
> > be validated) is to add a global element for the fragment into your
> > schema:
>
> Although this works, would you not end up in a situation where all types
> are made valid document roots just because fragment validation is
> required...?

Well, to be valid, your fragment's root should be a valid document root
per XML Schema. So I guess the answer is yes. You can always create a
separate schema which imports the original one and defines global
elements for each fragment. When we have validation in generated
code, it will be possible to instantiate an instance of some type
from a DOM sub-tree with validation. In that case you won't need
document roots.

hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060512/80beadfe/attachment.pgp


More information about the xsd-users mailing list