[xsde-users] Fwd: Unwanted validation
James Sutton
jrs at jmsutton.co.uk
Fri Oct 1 07:11:00 EDT 2010
- just a quick update..
The hand-edited code (removed parsers to read only the title) does work now and is 4X faster, which is a great help
Thanks
James
Begin forwarded message:
> From: James Sutton <jrs at jmsutton.co.uk>
> Date: 1 October, 2010 10:26:08 GMT+01:00
> To: xsde-users at codesynthesis.com
> Subject: Unwanted validation
>
> Hi Codesynthesis,
>
>
> I would like to provide a list of titles of my (large) MusicXML files, which can be obtained by parsing just a few small elements. Currently it has to parse and validate each entire file just to get this information, and it is very slow.
>
> I tried switching off validation, but it gives an error when generating the code from the schema:
>
> error: complex type 'dynamics' contains choice compositor
> error: parser validation is required to handle this construct.
>
> also it seems that must be decided at build time, so, since I will need validation for reading the full files, I must also have validation when I don't want it. Why can't I decide at runtime ?
> I am struggling to hand-edit the generated code to remove all the unwanted parsers (for notes etc) for the titles-only version, after reading in the documentation that this is possible. Is this going to work or am I wasting my time? At the moment the validator is complaining and refusing to read the file at all, but this could be because I have made an error. I can't help feeling that if I remove parsers it's going to think that unparsed elements must be invalid, so this approach is doomed.
>
>
>
> regards
> James Sutton
>
More information about the xsde-users
mailing list