Hello Andrew
 
Thanks for your response.
 
Can you say anything about Issue 1 in my email, the parsing error of the 
imported schema while reading.
 
On Issue 2, that you have responded to, is there a way to give SchemaReader a 
default set of schemas, that it can use to resolve any imported schemas. For 
e.g, if an element is defined at type xsd:string or xsd:int, the SchemaReader 
knows implicitly xsd schema, and the xsd schema location doesn't have to 
defined in the schema document via an import. Similiarly can other well-known 
or standard schemas, be plugged in programmatically or via propeties into the 
SchemaReader, so that these schemas need not have a schema location defined, 
and would need just namespace uri defined. 
 
Thanks in advance, regds,
Herman
 
 
 

        -----Original Message----- 
        From: Andrew Fawcett [mailto:[EMAIL PROTECTED] 
        Sent: Wed 12/15/2004 5:22 AM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: Re: [castor-user] XML - Issues with imported schemas
        
        
        
        Have you considered outputing your in memory schemas to files, maybe it 
will be easier to see if the XML Schema being output is invalid or not? BTW, 
you call setSchemaLocation on the Schema object your passing to the 
addImportedSchema method to set its location.

  _____  

        From: Herman D'costa [mailto:[EMAIL PROTECTED] 
        Sent: 14 December 2004 19:33
        To: [EMAIL PROTECTED]
        Subject: [castor-user] XML - Issues with imported schemas
        
        

        Hello 

        I am new to Castor, and am learning while using the XML Schema api. I 
am using castor-0.9.5.4-xml.jar. I have 2 issues related to imported schemas.

        Issue 1. I am trying to load schemas at the following urls 
        
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
 
        
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
 

        The second one is an imported schema at that location in the first one. 
When I try loading the first one using the SchemaReader's read api, I get the 
following error

        NestedIOException: In document: 
'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
 
        Parsing Error : Content is not allowed in prolog. 
        Line : 1 
        Column : 1 
         { nested error: In document: 
'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
 
        Parsing Error : Content is not allowed in prolog. 
        Line : 1 
        Column : 1 
        } 

        If I try and load the second one (by using its url), it loads just 
fine. Am I missing to do something or is this a bug? 


        Issue 2. I have an in-memory Schema object, and imported another 
in-memory Schema, using Schema's addImportedSchema api. All is fine. I then 
serialized the schema to a byte array using SchemaWriter. When I passed the 
byte array to a different program to load into a Schema object, it complained 
that it couldn't resolve the namespace of the imported schema.

        Is there a way to specify a Schema location when adding imported 
schemas? Maybe its by using setSchemaLocation on the imported schema before 
calling addImportedSchema. However, when an in-memory schema is imported, what 
can I specify as a schema location?

        Is there another way to deal with this problem? 

        Thanks, regds 
        Herman D'Costa 
        Software Engineer 
        Digital Evolution Inc. 
        http://digev.com 




        
Season's greetings from all at CODA

  _____  


The information in this message is confidential and may be legally privileged. 
It may not be disclosed to, or used by, anyone other than the addressee. If you 
receive this message in error, please advise us immediately.

Internet emails are not necessarily secure. CODA does not accept responsibility 
for changes to any email which occur after the email has been sent. Attachments 
to this email may contain software viruses, which could damage your systems. 
CODA has checked the attachments for viruses before sending, but you should 
virus-check them before opening.

         

<<winmail.dat>>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to