Skip to main content

How to tell XJC to ignore some xsd elements?

1 reply [Last post]
fdo
Offline
Joined: 2006-02-16

My application receives signed xml documents.
Therefore, the xsd file has a reference to the xmldsig xsd file.

The usage is only one-way: I only unmarshall xml into java objects.
I'd like:
- to avoid the generation of org/w3/_2000/_09/xmldsig_/SignatureType classes and so on
- that jaxb skips the ds:Signature element when unmarshalling my document

I though that this could be done using jxb bindings, but I'm still reading the spec and can't find anything... any clue?

Best regards

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
super_kohsuke
Offline
Joined: 2006-01-27

The easiest thing to do is to tweak a schema just for the sake of JAXB and remove references to ds:Signature.

There are a few other ways, but to find out what works for you the best I need to know your situation a little better.