IMO, these two examples are additional use cases calling for extensibility of XML schema languages.
Eric
-- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- Attached file included as plaintext by Ecartis -- -- Desc: Forwarded message - Re: [xml-dev] English sentences, Return-Path: <cyrus@poweredge.paris.dyomedea.com> Received: from poweredge.paris.dyomedea.com ([unix socket]) (authenticated user=vdv bits=0) by poweredge.paris.dyomedea.com (Cyrus v2.1.4-Debian(unstable)) with LMTP; Thu, 27 Jun 2002 14:09:18 +0200 X-Sieve: CMU Sieve 2.1 Return-Path: <xml-dev-return-10236-vdv=dyomedea.com@lists.xml.org> Received: from localhost (poweredge [127.0.0.1]) by poweredge.paris.dyomedea.com (Postfix) with ESMTP id 0043623042 for <vdv@poweredge.paris.dyomedea.com>; Thu, 27 Jun 2002 14:09:17 +0200 (CEST) Delivered-To: vdv@dyomedea.com Received: from mail.dyomedea.com [64.23.77.137] by localhost with POP3 (fetchmail-5.9.11) for vdv@poweredge.paris.dyomedea.com (single-drop); Thu, 27 Jun 2002 14:09:18 +0200 (CEST) Received: from mail.oasis-open.org (unknown [209.202.168.102]) by mail.dyomedea.com (Postfix) with SMTP id E0F881E45D for <vdv@dyomedea.com>; Thu, 27 Jun 2002 08:09:03 -0400 (EDT) Received: (qmail 15157 invoked by uid 60909); 27 Jun 2002 12:17:25 -0000 Mailing-List: contact xml-dev-help@lists.xml.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:xml-dev@lists.xml.org> List-Help: <mailto:xml-dev-help@lists.xml.org> List-Unsubscribe: <mailto:xml-dev-unsubscribe@lists.xml.org> List-Subscribe: <mailto:xml-dev-subscribe@lists.xml.org> Delivered-To: mailing list xml-dev@lists.xml.org Received: (qmail 15132 invoked by uid 0); 27 Jun 2002 12:17:24 -0000 From: Eric van der Vlist <vdv@dyomedea.com> To: Jonathan Borden <jborden@attbi.com> Cc: John Cowan <jcowan@reutershealth.com>, "Thomas B. Passin" <tpassin@comcast.net>, 'xml-dev' <xml-dev@lists.xml.org> In-Reply-To: <007401c21dce$0c1c1270$0201a8c0@ne.mediaone.net> References: <200206270331.XAA07306@mail.reutershealth.com> <007401c21dce$0c1c1270$0201a8c0@ne.mediaone.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.7 Date: 27 Jun 2002 14:07:16 +0200 Message-Id: <1025179636.2775.33.camel@ibook> Mime-Version: 1.0 Subject: Re: [xml-dev] English sentences, was: Re: [xml-dev] Announce: XML Schema, X-Spam-Status: No, hits=-5.4 required=5.0 tests=IN_REP_TO,SUBJ_HAS_SPACES,AWL version=2.1 On Thu, 2002-06-27 at 13:30, Jonathan Borden wrote: > Recognizing and processing natural language is something that's been done > for a couple of decades -- albeit imperfectly -- and as I am sure you are > aware, the grammar(s) are complicted -- what is generally needed is some > notion of the intended semantics of the sentences. In any case, this example > isn't a good use case for XML schema languages and 'validity'. No, but it is a good use case for extensibility in XML schema languages. If you are happy with the result of the unix "file" command to determine the type of a text and see if it's more likely a Java source code, a snippet of Python or an English text, you may want to validate the document using its result instead of the code. I am actually considering implementing pyxie based transformations into xvif to allow this kind of features: http://bugzilla.xmlschemata.org/cgi-bin/bugzilla/show_bug.cgi?id=14 Eric -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ ----------------------------------------------------------------- The xml-dev list is sponsored by XML.org <http://www.xml.org>, an initiative of OASIS <http://www.oasis-open.org> The list archives are at http://lists.xml.org/archives/xml-dev/ To subscribe or unsubscribe from this list use the subscription manager: <http://lists.xml.org/ob/adm.pl> -- Attached file included as plaintext by Ecartis -- Return-Path: <cyrus@poweredge.paris.dyomedea.com> Received: from poweredge.paris.dyomedea.com ([unix socket]) (authenticated user=vdv bits=0) by poweredge.paris.dyomedea.com (Cyrus v2.1.4-Debian(unstable)) with LMTP; Wed, 26 Jun 2002 16:00:20 +0200 X-Sieve: CMU Sieve 2.1 Return-Path: <xml-dev-return-10215-vdv=dyomedea.com@lists.xml.org> Received: from localhost (poweredge [127.0.0.1]) by poweredge.paris.dyomedea.com (Postfix) with ESMTP id 5A64D23042 for <vdv@poweredge.paris.dyomedea.com>; Wed, 26 Jun 2002 16:00:20 +0200 (CEST) Delivered-To: vdv@dyomedea.com Received: from mail.dyomedea.com [64.23.77.137] by localhost with POP3 (fetchmail-5.9.11) for vdv@poweredge.paris.dyomedea.com (single-drop); Wed, 26 Jun 2002 16:00:20 +0200 (CEST) Received: from mail.oasis-open.org (unknown [209.202.168.102]) by mail.dyomedea.com (Postfix) with SMTP id 754791E454 for <vdv@dyomedea.com>; Wed, 26 Jun 2002 09:58:27 -0400 (EDT) Received: (qmail 8471 invoked by uid 60909); 26 Jun 2002 14:07:31 -0000 Mailing-List: contact xml-dev-help@lists.xml.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:xml-dev@lists.xml.org> List-Help: <mailto:xml-dev-help@lists.xml.org> List-Unsubscribe: <mailto:xml-dev-unsubscribe@lists.xml.org> List-Subscribe: <mailto:xml-dev-subscribe@lists.xml.org> Delivered-To: mailing list xml-dev@lists.xml.org Received: (qmail 8460 invoked by uid 0); 26 Jun 2002 14:07:31 -0000 From: Eric van der Vlist <vdv@dyomedea.com> To: Jeni Tennison <jeni@jenitennison.com> Cc: 'xml-dev' <xml-dev@lists.xml.org>, John Cowan <jcowan@reutershealth.com> In-Reply-To: <33264882510.20020626143410@jenitennison.com> References: <200206261209.IAA24229@mail.reutershealth.com> <33264882510.20020626143410@jenitennison.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.7 Date: 26 Jun 2002 15:57:25 +0200 Message-Id: <1025099845.8297.34.camel@ibook> Mime-Version: 1.0 Subject: Re: [xml-dev] Announce: XML Schema, The W3C's Object-Oriented Descriptions for XML X-Spam-Status: No, hits=-5.3 required=5.0 tests=IN_REP_TO,SUBJ_HAS_SPACES,AWL version=2.1 X-Evolution-Source: imap://[email protected]/ Hi Jeni, On Wed, 2002-06-26 at 15:34, Jeni Tennison wrote: > For example, if you had something like: > > <length>12.5<unit>cm</unit></length> Note that this model is only a (simple) XSLT transformation away from something more "classical" and that (for instance) <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="length/text()[normalize-space()]"> <value> <xsl:value-of select="."/> </value> </xsl:template> <xsl:template match="*|@*"> <xsl:copy> <xsl:apply-templates select="@*|*|text()"/> </xsl:copy> </xsl:template> </xsl:transform> would transform it into <length><value>12.5</value><unit>cm</unit></length> which is much easier to validate with any schema language. That's here that xvif can help and let you write: <?xml version="1.0" encoding="iso-8859-1"?> <element xmlns="http://relaxng.org/ns/structure/1.0" name="length"> <if:transform type='http://www.w3.org/1999/XSL/Transform' xmlns:if='http://namespaces.xmlschemata.org/xvif/iframe'> <if:apply xmlns=""> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="length/text()[normalize-space()]"> <value> <xsl:value-of select="."/> </value> </xsl:template> <xsl:template match="*|@*"> <xsl:copy> <xsl:apply-templates select="@*|*|text()"/> </xsl:copy> </xsl:template> </xsl:transform> </if:apply> </if:transform> <element name="value"> <text/> </element> <element name="unit"> <text/> </element> </element> (this is embedded into Relax NG but I am pretty confident that this could be implemented on top of WXS as well). Eric PS: you can try it on http://downloads.xmlschemata.org/python/xvif/tryMe.cgi -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ ----------------------------------------------------------------- The xml-dev list is sponsored by XML.org <http://www.xml.org>, an initiative of OASIS <http://www.oasis-open.org> The list archives are at http://lists.xml.org/archives/xml-dev/ To subscribe or unsubscribe from this list use the subscription manager: <http://lists.xml.org/ob/adm.pl>Received on Thu Jun 27 14:15:42 2002
This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:29:47 UTC