- From: Sandy Gao <sandygao@ca.ibm.com>
- Date: Thu, 28 Feb 2008 12:03:30 -0500
- To: "zamp\@libero\.it" <zamp@libero.it>
- Cc: "public-sml" <public-sml@w3.org>
- Message-ID: <OF16C2B913.B60ED2D0-ON852573FD.005C5F6D-852573FD.005DB2A9@ca.ibm.com>
Travis, A couple of quick answers. Others may have more to add. First of all, <sml:uri> is only one kind of "reference scheme" defined by the SML spec. Others may be defined by other specs/implementations. For example, I can have my "evil" scheme "ignore all my children and attribute; this reference always points to my parent", then in the following example: <parent> <child sml:ref="true"/> </parent> "child" is an SML reference, and it points to "parent". This will always work in SML processors that support my evil scheme. Not fixing the scheme (to using URI or XPath) leaves a lot of freedom in terms of how reference schemes can be designed. This is very useful, see below. The second point is that we want SML to serve scenarios with legacy data. You may have terabytes of XML describing your system and now you want to take advantage of SML's validation capabilities. You certainly don't want to change all your date and insert XLink tags everywhere to replace your old references. Allowing flexible reference scheme design allows you to make minimum or no change to your data. You simply need to define your scheme (how they are recognized and dereferenced). You may only need to insert sml:ref="true" attributes to references in your XML data. Even that can be avoided by using a default value (DTD or Schema). So yes I agree XLink is a good mechanism to link XML data, especially when you are starting from scratch, but it does not meet all SML requirements. Thanks, Sandy Gao XML Technologies, IBM Canada Editor, W3C XML Schema WG Member, W3C SML WG (1-905) 413-3255 T/L 313-3255 "zamp\@libero\.it" <zamp@libero.it> Sent by: public-sml-request@w3.org 2008-02-27 07:22 AM To "public-sml" <public-sml@w3.org> cc Subject sml:ref vs xlink I All, recently I have read SML specification and in particular sml reference mechanism in XML instance document. However I don't understand the reason of introducing a new mechanism instead of using xlink. Are there some advantages in using sml:ref? If yes...which ones? That is to say...about this example: <EnrolledCourse sml:ref="true"> <Name>PHY101</Name> <Grade>A</Grade> <sml:uri> http://www.university.example.org/Universities/MIT/Courses.xml #xmlns(u=http://www.university.example.org/ns) xpointer(/u:Courses/u:Course[u:Name='PHY101']) </sml:uri> </EnrolledCourse> Why not like that? <EnrolledCourse> <Name>PHY101</Name> <Grade>A</Grade> <environment xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="extended"> <course xlink:type="locator" xlink:label="course" xlink:href="http://www.university.example.org/Universities/MIT/Courses.xml #xmlns(u=http://www.university.example.org/ns) xpointer(/u:Courses/u:Course[u:Name='PHY101'])"/> </enviroment> </EnrolledCourse> Best regards.. Travis
Received on Thursday, 28 February 2008 17:04:04 UTC