hi Erik:

    I changed to 'include' and still got the same errors,
I wonder if you have a sample xml schema file
I could share?

    Thanks a lot.

wei

>>> [EMAIL PROTECTED] 05/21/02 06:32AM >>>
We use Castor to read schema's with the import statement
and don't have any problems with it.
 
It looks like you have a schema problem, not a Castor problem.
Schema requires the import node to have an attribute named
'namespace'.
It doesn't look like you are using namespaces -- no targetNamespace
attribute on the schema node.  If this is correct, change your
'import'
node to an 'include' node -- 
it doesn't require you to use the 'namespace' attribute.

        -----Original Message----- 
        From: Wei Jiang 
        Sent: Mon 5/20/2002 5:37 PM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: [castor-dev] do castor source generator support "
import"
        
        

        hi,
            Does castor generator support " import"? I have an attached
xml
        schame.
            I got some errors message when I used castor generate java
source
        as follows:
        
            anyone has ideas?
        
        wei
        
        >>>>
        
        C:\111test>java org.exolab.castor.builder.SourceGenerator -i
        OrderableItemType.x
        sd -package com.xyz
        org.xml.sax.SAXException: 'namespace' attribute missing on
'import'
                at
        
org.exolab.castor.xml.schema.reader.ImportUnmarshaller.<init>(ImportU
        nmarshaller.java:111)
                at
        
org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(S
        chemaUnmarshaller.java:387)
                at
        
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
        
                at
        
org.apache.xerces.validators.common.XMLValidator.callStartElement(XML
        Validator.java:1284)
                at
        
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
        tScanner.java:1806)
                at
        
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
        atch(XMLDocumentScanner.java:1182)
                at
        
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
        canner.java:381)
                at
        org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
                at
        
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
        tor.java:388)
                at
        
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
        tor.java:441)
                at
        
org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:6
        65)
        
        C:\111test>java org.exolab.castor.builder.SourceGenerator -i
        OrderableItemType.x
        sd -package com.xyz
        org.xml.sax.SAXException: 'namespace' attribute missing on
'import'
                at
        
org.exolab.castor.xml.schema.reader.ImportUnmarshaller.<init>(ImportU
        nmarshaller.java:111)
                at
        
org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(S
        chemaUnmarshaller.java:387)
                at
        
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
        
                at
        
org.apache.xerces.validators.common.XMLValidator.callStartElement(XML
        Validator.java:1284)
                at
        
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
        tScanner.java:1806)
                at
        
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
        atch(XMLDocumentScanner.java:1182)
                at
        
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
        canner.java:381)
                at
        org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
                at
        
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
        tor.java:388)
                at
        
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
        tor.java:441)
                at
        
org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:6
        65)
        
        

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

Reply via email to