You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "O'Connor, Ivan" <iv...@csfb.com> on 2001/05/23 19:18:06 UTC

Namespaces and schema locations

I'm having a problem specifying (or understanding) namespaces - any help would be appreciated.

My schema document looks roughly like this:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://com.csfb.equity.isis/report"
            targetNamespace="http://com.csfb.equity.isis/report">

  ... lots of definitions here...

  <xsd:element name="report" type="reportType"/>

</xsd:schema>

As far as I understand it, this says that the default namespace is http://com.csfb.equity.isis/report, and the target namespace is the same. Any elements without a prefix belong to the default namespace.

In my instance document I have the following:

<report xmlns ="http://com.csfb.equity.isis/report"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://com.csfb.equity.isis/report
                            http://com.csfb.equity.isis/schema/Report.xsd">
... the report specification goes here...
</report>

This should, I believe, associate the namespace http://com.csfb.equity.isis/report with my schema definition, Report.xsd. When I run this through the parser (developed with Xerces-J 1.3.0) I get the following error:

Error: org.xml.sax.SAXParseException: General Schema Error: Grammar with uri 2: http://com.csfb.equity.isis/report , can not found.

Can anyone shed any light on this?

Thanks,

Ivan

This message is for the named person's use only.  It may contain 
confidential, proprietary or legally privileged information.  No 
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender.  You must not, directly or indirectly, use, disclose, distribute, 
print, or copy any part of this message if you are not the intended 
recipient. CREDIT SUISSE GROUP and each of its subsidiaries each reserve
the right to monitor all e-mail communications through its networks.  Any
views expressed in this message are those of the individual sender, except
where the message states otherwise and the sender is authorised to state 
them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is 
indicative only, is subject to change and does not constitute an offer to 
deal at any price quoted.
Any reference to the terms of executed transactions should be treated as 
preliminary only and subject to our formal written confirmation.





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org