DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15878>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15878

schema name in namespace property changed to URI





------- Additional Comments From [EMAIL PROTECTED]  2003-11-20 19:05 -------
I am also experiencing this problem in v2.5.0
In the following example - wether I set the schema location programmatically or
as an attribute in the xml file, my resolver ends up getting a systemID which
has been resolved to the the path the xml file exists in, i.e.
sys: file:///c:/location/of/somefile.xml/some.xsd
instead of:
sys: some.xsd

This makes it impossible for our Resolvers to resolve systemIDs with a relative
path (e.g. a system id that would be in a path in a jar) because we don't know
where is begins in the expanded systemID given to us.

public class XMLResolver implements EntityResolver
{
        public static void main(String[] args) throws Exception
        {
                System.out.println("Starting");
                XMLReader parser = new SAXParser();
parser.setFeature("http://xml.org/sax/features/validation";, true);
parser.setFeature("http://apache.org/xml/features/validation/schema";, true);
parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation";,
"some.xsd" );
                
                parser.setEntityResolver( new XMLResolver() );

                parser.parse(new InputSource("somefile.xml"));
                System.out.println("Done");
        }

        public InputSource resolveEntity(String publicId, String systemId) throws
SAXException, IOException
        {
                System.out.println("pub: " + publicId);
                System.out.println("sys: " + systemId);
                return null;
        }
}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to