I have some partly-finished Squeak code that creates a schema-specific 
validating XML parser & generator (well, data objects that do this) given an 
XSD.  My motivating use case is to enable quick support of new XML-based file 
formats.  So, you would design your objects as usual, then run my schema 
parser, which would stub out objects to parse & generate the new format.  Then 
you would write tiny conversion methods between your objects and the new ones.  
Poof!  Support for a new file format.

Partway through I found an enormous Java library that did something similar; it 
may be the one Phil mentions below. The one I recall was pretty big (13 
namespaces) and I decided not to just port it because it seemed more complex 
than I thought was needed.  On the other hand, it is finished, whereas..

I have been too busy to work on mine for several years now :( .  So, I will 
hunt for it tonight & put the latest version somewhere other people can get & 
work on it.  I don't remember what state it is in, but I never do so I 
think/hope it has lots of comments & tests for how I intended it to work.  

The other catch (besides it being half-finished) is, if/when I eventually start 
working on it again, I will turn it into a completely pedantic validating 
parser/emitter, because I want it to e.g. prevent XML injection without 
conscious thought from the developer using it.  I am happy to help/advise 
anyone who wants this same goal to meet it, but if you want to add direct 
accessors or anything else that routes around the validation, please do so in a 
package that extends mine (in the same classes is fine) so that I can still 
meet my original intent when I eventually get back to it.

Brenda

On Oct 1, 2013, at 4:38 AM, "p...@highoctane.be" <p...@highoctane.be> wrote:

> I mean that XSD is XML indeed but the usage is for defining structures, and 
> crafting all kinds of artifacts from there.
> 
> I was involved with a project where a ton of XSDs were used to define 
> business message structures.
> 
> Reading XML is not giving us reading XML with XSD schema validation nor 
> Classes generated from XSD files (as does Java JAXB).
> 
> 
> https://jaxb.java.net/2.2.7/docs/
> 
> Phil
> 
> 
> 
> On Tue, Oct 1, 2013 at 10:10 AM, Norbert Hartl <norb...@hartl.name> wrote:
>> 
>> Am 30.09.2013 um 19:35 schrieb p...@highoctane.be:
>> 
>> > XSD is not the same.
>> >
>> What do you mean?
>> 
>> Norbert
>> 
>> > Guess you want to do something like JAXB or schema validation. But I don't 
>> > know of anything like that in Pharo...
>> >
>> > Phil
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to