Remove optional elements

Here should go questions about transforming XML with XSLT and FOP.
alk
Posts: 32
Joined: Wed Jan 25, 2006 5:43 pm

Remove optional elements

Post by alk »

Hi,

I'd like to run an XSLT that removes all elements from the source document which are optional according to the related schema. Is there a way to determine if an element ist mandatory or optional???

Regards
- Alex
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Remove optional elements

Post by george »

Hi Alex,

In the general case I believe it is very difficult as you practically need to implement an XML Schema processor in XSLT. If you can take advantage of some patterns in your schema then that may be a reasonably doable task.

Best Regards,
George
George Cristian Bina
Post Reply