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] overrun with bohemians?

[ Lists Home | Date Index | Thread Index ]

Rick Jelliffe:
 
> I think we need to draw the line between different kinds of "typelessness".
> 
> There is 
>     * late binding (where the information needed for typing is only available
>      at the last minute)

In my construction, I think this is the preference of most bohemians.


>     * reflection (where the object carries its type information around)

Gah.  Silly Java terminology  ;-)

Can we just call this "intrinsic type".  i.e. something that approximates 
English usage?

>     * casting (where the language or some context forces a thing to be 
>         treated a certain type)

Hmm.  This to me is just late binding with language-specific details.

>     * generic operations (where, rather than a thing having no type, it 
>         is deemed to have some very generic operations, such as equality testing
>         only)

Yes.  Yes.  Yes.  I think this is an *essential* conformance level for XML 
data typing.  If you put this generic power into a Turing complete language 
such as XSLT, then you end up with all the power of static typing, yet much 
more flexibility.

>     * dynamic typing, where a value is looked at, and the type is selected from
>         it according to lexical hints

Yes.  This should be every bit as important as static typing.  Also, the hints 
should also be able to come from environment.

>     * typelessness, at an extreme where an operation occurs without any
>     checking on some kind of memory location or a pointer. 
> 
> The occurrences of these in XML might be
>     * late binding, such as in XML Schemas when you may access base
>         types very late

Unless XPath invokes the type without your explicitly telling it to do so.  
Also, it seems to me that using a Schema is very early binding (i.e. during 
validation, which is considered a phase in parsing).  Why do you say it is 
late?

>     * reflection, such as using xsi:type to figure out the type

I don't understand this.  I would say that reflection is more a matter of 
using type() in XPath 2.0.  xsi-:type is a type declaration, not a reflection 
operator.

>     * casting, such as where a query treats some text as a particular type
>     * generic operations, pretty much what XML is without XML Schemas,
>         wander around trees and look a strings.

Well not really.  Fundamental specs such as XPath don't provide adequate tools 
for generic processing.  We've discussed this on XML-DEV before, and have an 
idea what such a module might look like.  Along comes XPath 2.0 which dumps 10 
tons of cruft for static typing, and still not a peep for generic processing, 
which, as you say is "XML is without XML Schemas".  Doesn't that seem queer?


>     * dynamic typing, such as the = operation in XSLT

Which is what I say we need more of, on the same modular basis as the need for 
data typing.

That's all.

>  I don't really see any typelessness at work in XML: it seems to be a property
> of languages rather than data. 

Oh no.  It is certainly a property of data.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Tour of 4Suite - http://www.xml.com/pub/a/2002/10/16/py-xml.html
Proper XML Output in Python - http://www.xml.com/pub/a/2002/11/13/py-xml.html
RSS for Python - http://www-106.ibm.com/developerworks/webservices/library/ws-p
yth11.html
Debug XSLT on the fly - http://www-106.ibm.com/developerworks/xml/library/x-deb
ugxs.html






 

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

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