You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Andrew Newton <an...@netsol.com> on 2000/07/24 20:07:30 UTC

restricting schema locations

Is there anyway to restrict or replace the schema locations that
are specified in documents?  When using DTD's, replacing system id's
was easy with an entity resolver, but I can't find a way to do that
with schema locations.

-Andy

Re: restricting schema locations

Posted by Andy Clark <an...@apache.org>.
Andrew Newton wrote:
> Sorry to waste the bandwidth.

No problem. Crap, I'm wasting even more bandwidth! :)

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org

Re: restricting schema locations

Posted by Andrew Newton <an...@netsol.com>.
On Mon, Jul 24, 2000 at 05:08:55PM -0700, Andy Clark wrote:
> 
> The Schema locations should go through the EntityResolver like
> everything else. If not, then someone should fix it and send in
> the patch to be applied.

This is my fault.  I started looking at the Xerces 1.1.2 code I
was using and then compared it to the CVS repository.  It looks
like this has been fixed in revision 1.44 of
org/apache/xerces/validators/common/XMLValidator.java.
Sorry to waste the bandwidth.


Re: working with XMLContentSpec?

Posted by Eric Ye <er...@locus.apache.org>.
Scope information is not stored in the XMLContentSpec. for Schema Grammar,
you can get the scope index by calling the method getElementDefinedScope(int
elementDeclIndex), this the scope you will be using to resolve all the
children element of this element.
For DTD Grammar, you can always use "-1" for all the scope index.
_____


Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org

----- Original Message -----
From: "Andreas Schmidt" <an...@team-konzept.de>
To: <ge...@xml.apache.org>; <xe...@xml.apache.org>
Sent: Friday, July 28, 2000 5:23 AM
Subject: working with XMLContentSpec?


> hi,
>
> i'm triing to analyze the grammar of a schema/dtd to transform the
complete
> grammar into an new representation. with the help of the
> TraverseSchema-class i get the SchemaGrammar, and then i traverse the
> grammar through access to the XMLElementDecl of my "root"-element and
> traverse it's XMLContentSpec. when a XMLContentSpec is a leaf-node
refering
> to another element, i use XMLContentSpec .value as the name-index in the
> StringPool and get the index of the corresponding XMLElementDecl through
> SchemaGrammar.getElementDeclIndex( XMLContentSpec.value, 0 ).
>
> my problem is the second parameter of getElementDeclIndex, scopeIndex. i'm
> not shure, how to get this parameter out of the XMLContentSpec. it doesn't
> seem to be part of XMLContentSpec.
>
> what is the correct value for scopeIndex, and how can i get it?
>
> thanks
> andi
>
>
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>
>


working with XMLContentSpec?

Posted by Andreas Schmidt <an...@team-konzept.de>.
hi,

i'm triing to analyze the grammar of a schema/dtd to transform the complete 
grammar into an new representation. with the help of the 
TraverseSchema-class i get the SchemaGrammar, and then i traverse the 
grammar through access to the XMLElementDecl of my "root"-element and 
traverse it's XMLContentSpec. when a XMLContentSpec is a leaf-node refering 
to another element, i use XMLContentSpec .value as the name-index in the 
StringPool and get the index of the corresponding XMLElementDecl through 
SchemaGrammar.getElementDeclIndex( XMLContentSpec.value, 0 ).

my problem is the second parameter of getElementDeclIndex, scopeIndex. i'm 
not shure, how to get this parameter out of the XMLContentSpec. it doesn't 
seem to be part of XMLContentSpec.

what is the correct value for scopeIndex, and how can i get it?

thanks
	andi


working with XMLContentSpec?

Posted by Andreas Schmidt <an...@team-konzept.de>.
hi,

i'm triing to analyze the grammar of a schema/dtd to transform the complete 
grammar into an new representation. with the help of the 
TraverseSchema-class i get the SchemaGrammar, and then i traverse the 
grammar through access to the XMLElementDecl of my "root"-element and 
traverse it's XMLContentSpec. when a XMLContentSpec is a leaf-node refering 
to another element, i use XMLContentSpec .value as the name-index in the 
StringPool and get the index of the corresponding XMLElementDecl through 
SchemaGrammar.getElementDeclIndex( XMLContentSpec.value, 0 ).

my problem is the second parameter of getElementDeclIndex, scopeIndex. i'm 
not shure, how to get this parameter out of the XMLContentSpec. it doesn't 
seem to be part of XMLContentSpec.

what is the correct value for scopeIndex, and how can i get it?

thanks
	andi


Re: restricting schema locations

Posted by Andy Clark <an...@apache.org>.
Andrew Newton wrote:
> Is there anyway to restrict or replace the schema locations that
> are specified in documents?  When using DTD's, replacing system id's
> was easy with an entity resolver, but I can't find a way to do that
> with schema locations.

The Schema locations should go through the EntityResolver like
everything else. If not, then someone should fix it and send in
the patch to be applied.

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org