Re: Tool that finds unused simpleTypes?

Try the following (untested) snippet

fn:distinct-values($schema//xs:simpleType/@name[not(.=$schema//xs:element/@type/string())])

Loren Cahlander

> On Mar 28, 2016, at 1:19 PM, Michael Kay <mike@saxonica.com> wrote:
> 
> Saxon's schema processor has the option -stats:filename to report on the usage of schema components during a validation episode. IIRC it only lists the components that were used (not those that weren't) but you could do some post-processing to derive this information.
> 
> Michael Kay
> Saxonica
> 
> 
>> On 28 Mar 2016, at 17:42, Costello, Roger L. <costello@mitre.org> wrote:
>> 
>> Hi Folks,
>> 
>> I am seeking a Java tool that finds all unused simpleTypes in an XML Schema.
>> 
>> Does such a tool exist?
>> 
>> /Roger
>> 
> 
> 
> 

Received on Wednesday, 30 March 2016 15:25:23 UTC