logo       

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

Overriding xsi:schemaLocation throughout XML: msg#00023

Subject: Overriding xsi:schemaLocation throughout XML
I was just wondering if it's possible to prevent Xerces from evaluating 
xsi:schemaLocation declarations while performing a validating SAX parse of an 
XML document.

My application is accepting XML documents which must be validated against a 
schema which I provide as an InputSource via the 
"http://java.sun.com/xml/jaxp/properties/schemaSource"; property.  I'd like to 
prevent it from loading more based on schemaLocations within the XML, that way 
I needn't worry if someone submitting XML is referencing local schemas.

When I parse the following document with the schema provided via the JAXP 
property:

<?xml version="1.0" encoding="UTF-8"?>
<my:root xmlns:my="my:namespace" my:att1="String" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="my:namespace file://c:/foo.xsd">
        <my:ele1>String</my:ele1>
        <my:ele2>42</my:ele2>
</my:root>

my EntityResolver receives a call for Public ID="null" and System 
ID="file://c:/foo.xsd", where I wouldn't expect it to receive any calls at all. 
 Is there a particular parser or reader feature/property that I ought to be 
setting to prevent this?

Thanks,
 - Court



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo