Hi Neil,

Hi Jeff,

The values of these properties get resolved when/if there are namespaces
used in instance documents which match those the parser is expecting.

Ok, good. So let me try again with a direct question. Why don't you call
the EntityResolver implementation that I registered when I created the parser? Or
Do you do call it and I misunderstood your note.


My response to your second question would be that, if you need an
EntityResolver, use one, and we should provide one that does the job by

You provide "one" what? The EntityResolver is an interface, the application developer provides it. The parser code calls it if there is one ( a callback right?).


providing you all the information you need rather than encouraging you to
spread out your schema-redirection code into multiple places.

I do not understand this part about spreading my schema-redirection., perhaps it is not clear to me, would like to know what the behavior is. Is this in the documentation?

E.g. A user has XSI declaration to either noNamespaceSchemaLocation and/or schemaLocation in their instance document, and then in our application we set either purposely (because we are obfuscated developers) or by accident using the following methods:

SAXParser::setExternalNoNamespaceSchema or
SAXParser::setExternalSchemaLocation ( in the doc, you said you specify a list of schemas..... how? ... comma separated..., call method multiple times.).


How then does parsing works here ? Would the parser just ignore the XSI hint and use the methods setExternaXX... associations? What are the rules?

I still want my application to use the EntityResolver because that is what I expect from
SAX, because even though my instance documents say use this Schema X for this namespace Y, I am in a server or have some security constrains on what version of the Schema to use, and I want my EntityResolver Implementation to do that work.


Therefore, that is what I said or meant to say in my previous notes that a programmer may expect if there is an EntityResolver Handler to handle the external entities, regardless of how they are hinted in the document instance or set in the application developed by the application programmer.

The great value of the SAXParser::setExternalNoNamespaceSchema or
SAXParser::setExternalSchemaLocation methods are that they provide the schema association with the instance documents even in the cases when those are not hinted as per the spec XSI usage.


Regards,

Jeffrey Rodriguez



Cheers, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED]





"Jeffrey
Rodriguez" To: [EMAIL PROTECTED]
<[EMAIL PROTECTED] cc:
ail.com> Subject: Re: how to use external schema?


                      09/05/2003 01:10
                      PM
                      Please respond to
                      xerces-c-dev





Hi Neil,

I completely understand the rational on not calling the EntityResolver
Interface implementation when an external-schemaLocation is set.

What worries me is that then we are inconsistent with the usage of the
EntityResolver Interface.

EntityResolver class allows applications to resolve external entities, by
providing an
external-schemaLocation we just gave another way to locate a Schema which
is
an
external entity (another way than the xsi:schemalocation tags right?).

My question then is when is the external-schemaLocation used, when is the
Schema
resolved? I would argue that at this point we should allow an
EntityResolver
implementation to be called. If there are no implementation of the
interface
then there is not too much of a price to pay.

Somebody would say next, if a programmer knows  and  sets the
external-schemaLocation then it may be wasteful to call the EntityResolver,

but what if I want to wait until  EntityResolve time to access a Database
in
a server and return to the parser an InputSource, which has a local
controlled version of the
Schema or even a special case where I override witch an empty
MemoryInputSource?

Regards,

                              Jeffrey Rodriguez
                              SVL

>From: "Neil Graham" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: how to use external schema?
>Date: Fri, 5 Sep 2003 11:59:29 -0400
>
>Hi Jeff,
>
>For clarity, if the application sets the external-schemaLocation or
>external-noNamespaceSchemaLocation properties on one of the parsers, no
>callback to the EntityResolver will be made when items with namespaces (or
>lack thereof) that correspond to those in the properties are encountered
in
>the instance document. The rationale for this is that, since it's the
>application that specified the value of the property, there isn't very
much
>point in calling back to the application's EntityResolver; if an
>application wanted its EntityResolver to be called for a given namespace,
>then it wouldn't seem to make sense for it to have set the corresponding
>property.
>
>Cheers!
>Neil
>Neil Graham
>XML Parser Development
>IBM Toronto Lab
>Phone: 905-413-3519, T/L 969-3519
>E-mail: [EMAIL PROTECTED]
>
>
>
>
>
> "Jeffrey
> Rodriguez" To:
>[EMAIL PROTECTED]
> <[EMAIL PROTECTED] cc:
> ail.com> Subject: Re: how to use
>external schema?
>
> 09/05/2003 11:50
> AM
> Please respond to
> xerces-c-dev
>
>
>
>
>
>Hi Agrawal,
>
>How did you associate your Schema with the instance document. Did you use
a
>xsi:noNamesSpaceLocation or xsi:schemaLocation?
>
>If you did so I would have expected the parser ( indeed it used to do tha
>before....) to
>call the entity resolver.
>
>Furthermore, I would expect that setting also the
>setExternalSchemaLocation
>instead of
>the xsi instructions to also call the entityResolver.
>
>Otherwise I think that this is an inconsistency.
>
>So first let us know an answer to my first question.
>
>Regards,
>
> Jeffrey Rodriguez
> Silicon Valley
>
>
>
> >From: "Agrawal, Vikas (ELS)" <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: how to use external schema?
> >Date: Fri, 5 Sep 2003 10:26:52 +0100
> >
> >Hi All,
> >
> >I am trying to parse my file against a schema. Before I was parsing it
> >against a external DTD and it was working fine going through my entity
> >resolver. As soon as I try to use schema it stops going into entity
> >resolver.
> >I know I can set the schema location into the parser using
> >setExternalSchemaLocation() function but to do that I will have to
>extract
> >this info from xml file manually. I do not want to do that. I want
> >something
> >like entity resolver for schema.
> >Thanks & Regards
> >Vikas
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>_________________________________________________________________
>Send and receive larger attachments with Hotmail Extra Storage.
>http://join.msn.com/?PAGE=features/es
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


_________________________________________________________________
Fast, faster, fastest: Upgrade to Cable or DSL today!
https://broadband.msn.com


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






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


_________________________________________________________________
Fast, faster, fastest: Upgrade to Cable or DSL today! https://broadband.msn.com



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



Reply via email to