OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XSD spec question

[ Lists Home | Date Index | Thread Index ]

Hi,

On mer, 2005-04-27 at 07:33 +0300, Razvan MIHAIU wrote:
> Eric van der Vlist wrote: 
> > On mar, 2005-04-26 at 13:22 -0700, Chris Griffin wrote:
> >   
> > > In section 3.14.2 of http://www.w3.org/TR/xmlschema-1/ it says "{any  
> > > attributes with non-schema namespace . . . }" Does that mean I can  
> > > add my own attributes? For example can I do this:
> > > 
> > >   <simpleType name="myName" xyz:myattribute="something">
> > >    . . .
> > >   </simpleType>
> > >     
> > 
> > Exactly!
> > 
> > Eric
> >   
>     I was not aware of this feature before. In fact, if the above is
> true, it is not possible to validate an XML Schema (which itself is an
> XML document) against a DTD because there is no way to specify in a
> DTD that an element can have any attributes.
>     The obvious question is why would you need attributes outside the
> XML Schema specification ? If you extend an XML Schema in such a way
> then you defeat one of the main goals of XML, which is to be portable
> (only you tool will understand the custom attributes)

That depends what you call portable. Your schemas are still portable in
the sense that they are still producing the same results when used by a
schema processor to validate a document. 

In other words, the core features defined in the WXS recommendations are
portable (or should be if all the implementations were conformant, but
that's another thread!).

Now, allowing foreign namespaces does insure that another of the main
goal of XML (to be eXtensible) can be achieved and that's a trade off:
you allow this extensibility, but you take the risk that some extensions
might not be widespread and might not be as portable as we would like.

IMO, that's worth the pain :-) ...

Eric 
-- 
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS