Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Modelling composite Schemata

From: Frans Englich <frans.englich@-----.--->
To: Kasimier Buchcik <kbuchcik@---------.-->
Date: 11/19/2004 6:05:00 PM
On Thursday 18 November 2004 17:28, you wrote:
> Hi,
>
> Frans Englich wrote:
> > Hello,
> >
> > In an XML format of mine I need embedded XHTML, information for human
> > reading, documenting the "object" the document instance describes. I have
> > hesitations on how to do that in the best way.
> >
> > Currently I do like this:
> >
> >        <xsd:import namespace="http://www.w3.org/1999/xhtml"
> >                
> > schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"/>
> >
> >         <xsd:element name="test" type="xhtml:Block"/>
> >
> >
> > However, from what I can tell, the content of the <test> element isn't
> > XHTML any longer, but just a brick of the document I built, labeled as
> > what the targetNamespace says. I see namespaces as "identifiers" for XML
> > applications, and any 3rd party, such as a a XSLT sheet, no longer sees
> > XHTML, but must learn my particular format.
> >
> > That was what I _first_ thought, but then I realized that:
> >
> > <test>
> >         <div></div>
> > </test>
> >
> > didn't validate without <div> being in the XHTML namespace. Apparently,
> > it "is" still XHTML.
> >
> > So I'm confused. What if I /didn't/ want it to be XHTML but be my format,
> > and only borrow the XHTML complexType as a building block? (perhaps it's
> > a weird unrealistic question)
> >
> > I interpret it as that WXS:targetNamespace doesn't matter(not that I mind
> > in this case :) ); from whatever namespace a building block emerges from,
> > is what they'll have.
> >
> > I used libxml2 2.6.16 for validation.
>
> The mechanism you describe matches the machanism for 'included'
> schemata. If you want to 'borrow' the components for XHTML, you need
> create a totally different XSD: copy the XSD for XHTML, remove the
> specified targetNamespace or better set it to the targetNamespace of
> your main schema + hope that wildcards, if existing, will still make
> sense. Or just copy & paste the needed pieces into your main schema.
> The targetNamespace has its purpose; changing it, creates components
> which are totally different; just their names and structures are equal,
> which could theoretically happen with any XSD by _accident_.

Yes, I found more on the topic in this article:

http://www.xml.com/pub/a/2000/11/29/schemas/part1.html?page=7#building_usable

What I was asking about was basically the difference between import/include.


Cheers,

		Frans


From brs@i... Tue Nov 23 08:30:50 2004
Received: from bart.w3.org ([128.30.52.40])
	by frink.


transparent
Print
Mail
Like It
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