You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by "CALIP, JOSE D (SBCSI)" <jc...@sbc.com> on 2004/08/10 22:26:47 UTC

xsi:noNamespaceSchemaLocation

Hello,
I am a newbie in JaxMe and I was wondering if someone can help me with
my problem regarding XML documents that contain
xsi:noNamespaceSchemaLocation attribute on the root element. I tried to
include the xsi:noNamespaceSchemaLocation attribute to the Address.xml
sample that came with the JaxMe distribution and I am enountering the
following error while unmarshalling the xml document:

C:\Users\DevJaxMe\build\src>java
org.apache.ws.jaxme.examples.misc.address.AddressPrinter
Exception in thread "main" javax.xml.bind.UnmarshalException
        at
org.apache.ws.jaxme.impl.JMUnmarshallerImpl.unmarshal(JMUnmarshallerImpl
.java:103)
        at
org.apache.ws.jaxme.examples.misc.address.AddressPrinter.getAddress(Addr
essPrinter.java:42)
        at
org.apache.ws.jaxme.examples.misc.address.AddressPrinter.main(AddressPri
nter.java:57)
Caused by:
org.xml.sax.SAXParseException: Unknown attribute:
'noNamespaceSchemaLocation' in namespace
'hhttp://www.w3.org/2000/10/XMLSch
ema-instance'
        at
org.apache.ws.jaxme.impl.JMHandlerBase.validationEvent(JMHandlerBase.jav
a:119)
        at
org.apache.ws.jaxme.impl.JMHandlerImpl.addAttribute(JMHandlerImpl.java:4
9)
        at
org.apache.ws.jaxme.test.misc.address.impl.AddressTypeHandler.addAttribu
te(AddressTypeHandler.java:909)
        at
org.apache.ws.jaxme.test.misc.address.impl.AddressTypeHandler.startEleme
nt(AddressTypeHandler.java:926)
        at
org.apache.ws.jaxme.impl.JMUnmarshallerHandlerImpl.startElement(JMUnmars
hallerHandlerImpl.java:136)
        at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scan
RootElementHook(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
        at
org.apache.ws.jaxme.impl.JMUnmarshallerImpl.unmarshal(JMUnmarshallerImpl
.java:98)
        at
org.apache.ws.jaxme.examples.misc.address.AddressPrinter.getAddress(Addr
essPrinter.java:42)
        at
org.apache.ws.jaxme.examples.misc.address.AddressPrinter.main(AddressPri
nter.java:57)


For reference, here is the contents of the modified "Address.xml"
document which I am trying to unmarshal:

<Address xmlns="http://ws.apache.org/jaxme/test/misc/address"
	xmlns:xsi="hhttp://www.w3.org/2000/10/XMLSchema-instance"
	
xsi:noNamespaceSchemaLocation="/Users/Jodan/DevJaxMe/examples/misc/Addre
ss.xsd">
  <Name>
    <First>Jane</First>
    <Last>Doe</Last>
  </Name>
  <Postal>
    <Street>34 Main Street</Street>
    <ZIP>02215</ZIP>
    <City>Boston</City>
    <State>MA</State>
  </Postal>
   ... additional contents removed ...
</Address>

Basically, our application accepts xml docs that contain the
xsi:noNamespaceSchemaLocation attribute, hence the reason for me to be
able to get JaxMe to accept this attribute during unmarshalling. I hope
someone can help me resolve this problem.

Thanks,
Jodan Calip   |:^)
XML/Batch DSL Development
(925) 823-7053

RESTRICTED - PROPRIETARY INFORMATION
The Information contained herein is for use only by authorized employees
of SBC Services, Inc.,
 and authorized Affiliates of SBC Services, Inc., 
and is not for general distribution within or outside the respective
companies.



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: Recursion Support

Posted by Jochen Wiedmann <jo...@freenet.de>.
Ignacio Gonzalez wrote:

>Hi all!, I'd like to know when JaxMe is planning to support recursion. I
>beleive recursion is a key feature of XML. I am willing to contribute with
>all the effort needed. I was using JAXB for a while and found that it can't
>unmarshal documents with mandatory child elements (even though it is able to
>marshal them correctly - quite odd...) which is a blocker issue on the
>project I am working on. The thing is that JaxMeis able to unmarshal them
>correctly but produces a stackoverflowerror when marshalling... Also, to be
>able to generate the classes, I have to use JaxMe 0.2 and then use JaxMe 0.3
>to unmarshal them. Any ideas?
>  
>

Hi,

sadly, but recursion is not on high priority. Nested groups are 
currently the top priority.

In theory, recursion should not be too complex. If you are interested in 
working in that, I'll be happy to assist. As a first step, we'd need to 
know, where exactly the SackOverflowError occurs. (Which part of the 
software calls itself recusrively?)


Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Recursion Support

Posted by Ignacio Gonzalez <ig...@informa.es>.
Hi all!, I'd like to know when JaxMe is planning to support recursion. I
beleive recursion is a key feature of XML. I am willing to contribute with
all the effort needed. I was using JAXB for a while and found that it can't
unmarshal documents with mandatory child elements (even though it is able to
marshal them correctly - quite odd...) which is a blocker issue on the
project I am working on. The thing is that JaxMeis able to unmarshal them
correctly but produces a stackoverflowerror when marshalling... Also, to be
able to generate the classes, I have to use JaxMe 0.2 and then use JaxMe 0.3
to unmarshal them. Any ideas?

Thanks!

Nacho G. Mac Dowell


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: xsi:noNamespaceSchemaLocation

Posted by Jochen Wiedmann <jo...@freenet.de>.
CALIP, JOSE D (SBCSI) wrote:

>org.xml.sax.SAXParseException: Unknown attribute:
>'noNamespaceSchemaLocation' in namespace
>  
>

There is an existing bug report (JAXME-17 in Jira) for a similar 
problem. In other words, I would think, that this very problem is 
already fixed in the CVS version.

><Address xmlns="http://ws.apache.org/jaxme/test/misc/address"
>	xmlns:xsi="hhttp://www.w3.org/2000/10/XMLSchema-instance"
>	
>xsi:noNamespaceSchemaLocation="/Users/Jodan/DevJaxMe/examples/misc/Addre
>ss.xsd">
>  
>

I do not understand what you want to achieve this. From JaxMe's point of 
view, this will be accepted, because JaxMe simply ignores the 
noNamespaceSchemaLocation attribute. From a more formal point of view, 
you are contradicting yourself: You are using a namespace, while at the 
same time referring to a schema without namespace. Are you sure, that 
you aren't actually wanting xsi:schemaLocation?


Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org