Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: include and targetNamespace error

From: Debora Vanni <debora.vanni@------.--->
To: "Buchcik, Kasimier" <k.buchcik@---------.-->
Date: 5/18/2006 1:57:00 PM
Thanks  Kasimier and George for your answer!
Yes, I'm using libxml2 but I'm not using head version(I still don't have
authorization).
I'm using a .xsd file to validate an .xml file(two different files).
In the .xml file there is no targetNamespace, infact it works if I don't
put any targetNamespace(in both files)!
I have this .xml file
<iq message-id="FvG_O114" session="0" box-session="1323242123"
rc-session-id="157523655" to="tvblob" type="get">
    <service xmlns="tvblob:backend:directory">
        <action method="addsubscriber">
	<message-content>
            <parameters>
            
                <family-name>D'Orso Bianchi</family-name>
                <first-name>Paolo</first-name>
                <SSN>123ttt456HJ</SSN>
		[...]         
            
            </parameters>
	</message_content>            
        </action>
    </service>
</iq>
and the two .xsd I sent before.

The other problem is with ref and "all"(see my other message).
I change message.xml and .xsd to simplify messages for debug but the
problem is that I defined in common_types.xsd also some element(global)
and I would like to ref to that in add_subscriber.xsd. 
I have no targetNamespace in add_subscriber.xsd and I leave
targetNamespace("http://www.tvblob3.com/TVB") in common_types.xsd. I use
"import" instead of "include" but it only works with complexType -
sequence and not with complexType-all. Maybe the problem is always the
same(I don't have targetNamespace in .xml). 
But to use ref do I need a prefix(<xs:element ref =
"tvb:family-name"/>) ?
Because I also try to use NO targetNamespace(in both file .xsd) and
include ((<xs:element ref = "family-name"/>) but there still is the same
error(element note: Schemas validity error : Element 'note' [CT local]:
The
element content is not valid.)!
Thank you again
Debora

Il giorno gio, 18-05-2006 alle 11:02 +0200, Buchcik, Kasimier ha
scritto:
> Hi,
> 
> > -----Original Message-----
> > From: xmlschema-dev-request@w... 
> > [mailto:xmlschema-dev-request@w...] On Behalf Of Debora Vanni
> > 
> > Hi!
> > I have some problems with targetNamespace:
> > I have a file .xsd with some simpleType that I want to use also in
> > another file.xsd, so I would like to include it.
> > When I do it it comes out this error
> > element message_content: Schemas validity error : Element
> > 'message_content': No matching global declaration available.
> > (message_content is the root node of the message xml).
> > I tried not to use the include and define types inside schema but it's
> > the same. It only works without define targetNamespace and xmls.
> > These are files...what's wrong?
> > Please help me!
> 
> The error message:
> "Element 'message_content': No matching global declaration available."
> means that the element in your instance is in no namespace. Libxml2
> uses James Clark's namespace notation for error reports, thus a
> 'message_content' is an element in no namespace, and a
> '{urn:test:foo}message_content' is an element in the namespace
> "urn:test:foo".
> The element declaration of "message_content" in the given schema,
> declares the element to be in the namespace
> "http://www.tvblob3.com/TVB".
> 
> [...]
> 
> Regards,
> 
> Kasimier
> 
> 




From k.buchcik@4... Thu May 18 12:08:02 2006
Received: from maggie.w3.org ([193.51.208.68])
	by frink.w3.org 


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent