Hi,

 

I need to be able to get the path to the schema file containing an
element.  My code looks as follows...

 

    SchemaTypeSystem sts = XmlBeans.compileXsd(

        new XmlObject[] { schema }, XmlBeans

            .getBuiltinTypeSystem(), null);

    SchemaGlobalElement[] elements = sts.globalElements();

    for (int i = 0; i < elements.length; i++) {

      QName name = elements[i].getName();

      System.out.println(name.getLocalPart());

      System.out.println(name.getNamespaceURI());

      System.out.println(elements[i].getSourceName());

      System.out.println();

    }

 

What I'm getting in the output is

 

ConsolePage

http://consolesm.ibi.com/xml/default

URI_SHA_1_99380F8A4F1F7B881EB9C11045D749D945D503CB/default.xsd

 

TestElement

http://consolesm.ibi.com/xml/common

URI_SHA_1_F8CBF6F38FA3516688FCFF3BB4F67EBF73289C91/common.xsd

 

How do I translate the code that precedes the file name to the actual
path?  Is there any way to get the actual location?

 

Thank you,

 

Artem Portnoy

Reply via email to