- From: Holger Lausen <holger.lausen@deri.org>
- Date: Tue, 09 May 2006 19:26:14 +0200
- To: Joel Farrell <joelf@us.ibm.com>
- CC: SAWSDL WG <public-ws-semann@w3.org>
- Message-ID: <4460D0B6.7050308@deri.org>
Hi Joel, after talking to Jacek I have to rephrase my conclusion: From the xml schema the schemaMapping attribute can be attached to anything (element, complexType, simpleType, ...). It is just that the spec only talks about the possibility of attaching it to complexType. Previous mappings (in [1]) have been partly incorrect: * the xslt example includes <xsl:template match="/">[...] <xsl:value-of select="POAddress/recepientInstName"/> which would require a root tag with the name POAddress. * the xquery example includes: for $a in doc("POAddress.xml")/POAddress Which (1) links the xquery document to a particular xml file and (2) requires a root tag called POAddress. If you look at the example message [2] the tags are only named according to their element names. However Jack pointed to me another interpretation, in which you do not apply the complete message but only the element containing the schemMapping attribute to the transformation script, one could then safely assume within the mapping that the root element supplied is of type POAddress (whatever name it has) and write a translation similar to: <xsl:template match="/">[...] <xsl:value-of select="//recepientInstName"/> best Holger [1] http://www.w3.org/Submission/WSDL-S/#S9 [2] http://www.w3.org/2002/ws/sawsdl/spec/po/purchaseorder.xml Joel Farrell wrote: > Holger, > > I agree that mapping language details should be kept in the appendix and > not described in the normative parts of the spec. The small introductory > example we are going to include in the introduction should not involve > schemaMapping. > > You propose that the correct place in the schema to insert the > schemaMapping attribute is on an element that is defined by a complex type, > rather than on the complex type. I think I agree. > > Rama - do you remember the conversations with the XSLT expert that resulted > in this example and if there is any other consideration? > > The example [2] below looks correct. > > Regards, > Joel > > public-ws-semann-request@w3.org wrote on 05/08/2006 02:58:02 PM: > >> Hi, >> >> When creating a complete file set [1] out of the current po scenario I >> have detected a mistake in the current xslt examples, respectively in >> the methodology to extend complex types with schema mappings. (Please >> correct me if I am wrong since I am relative new to xsd/xslt&Co...) >> >> A schema mapping is explained as attribute of a complex type, a typical >> example (from the appendix) is: >> >> <complexType name="POAddress" >> sawsdl:schemaMapping="http://example.org/examples/POAddress.xq" >> sawsdl:modelReference="POOntology#Address"> >> >> A snippet of the given xslt is: >> >> <xsl:template match="/"> >> <POOntology:Address rdf:ID="Address1"> >> <POOntology:has_Receiver rdf:datatype="xs:string"> >> <xsl:value-of select="POAddress/recepientInstName"/> >> [...] >> >> To my understanding the xpath statement in the xslt select statement >> needs the tag name occurring in the actual xml message. However this tag >> name is dependent on the xsd element name and not xml complex type name. >> See [2] for an example how it could work. >> >> For me this has two concussions: (1) the schemaMapping attribute should >> be on the xs:element level (2) the main spec should not (or only in the >> appendix) include details on the possible mapping languages, since that >> would get two complex (and distracts from the core). >> >> >> best >> Holger >> >> >> >> >> [1] http://www.w3.org/2002/ws/sawsdl/spec/po/ >> [2] http://www.w3.org/2002/ws/sawsdl/spec/po/schemamapping-poaddress.xsl >> >> -- >> Holger Lausen >> >> Digital Enterprise Research Institute (DERI) >> http://www.deri.org/ >> >> Tel: +43 512 5076464 >> Email: holger.lausen@deri.org >> >> [attachment "signature.asc" deleted by Joel Farrell/Cambridge/IBM] > > -- Holger Lausen Digital Enterprise Research Institute (DERI) http://www.deri.org/ Tel: +43 512 5076464 Email: holger.lausen@deri.org
Received on Tuesday, 9 May 2006 17:26:27 UTC