From: James S. <jam...@us...> - 2006-12-20 13:47:22
|
Update of /cvsroot/wsmx/components/resources/communicationmanager In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19834/resources/communicationmanager Added Files: shuttleOutput.xsl shuttleInput.xsl Log Message: - shuttle XSLTs --- NEW FILE: shuttleInput.xsl --- <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ws="http://sfs.atos.es/shuttleBooking" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.1"> <xsl:output method = "text" encoding="utf-8" indent="yes" /> <xsl:template match = "/" > <![CDATA[ wsmlVariant _"http://www.wsmo.org/wsml/wsml-syntax/wsml-flight" namespace{ _"http://www.infrawebs-eu.org/sfs/ontologies/shuttleBooking_input#", sb _"http://www.infrawebs-eu.org/sfs/ontologies/shuttleBooking#", dc _"http://purl.org/dc/elements/1.1#", dt _"http://www.infrawebs-eu.org/sfs/ontologies/dateTime#", bo _"http://www.infrawebs-eu.org/sfs/ontologies/booking#", sh _"http://www.infrawebs-eu.org/sfs/ontologies/shuttle#", loc _"http://www.infrawebs-eu.org/sfs/ontologies/location#", cu _"http://example.org/customer#", xsd _"http://www.w3.org/2001/XMLSchema#" } ontology _"http://www.infrawebs-eu.org/sfs/ontologies/shuttleBooking_input" importsOntology { _"http://www.infrawebs-eu.org/sfs/ontologies/shuttleBooking#", _"http://www.infrawebs-eu.org/sfs/ontologies/dateTime", _"http://www.infrawebs-eu.org/sfs/ontologies/booking", _"http://www.infrawebs-eu.org/sfs/ontologies/shuttle", _"http://www.infrawebs-eu.org/sfs/ontologies/location" } ]]> <xsl:apply-templates select="ws:shuttleBookingRequest"/> <xsl:apply-templates select="ws:shuttleRequest"/> </xsl:template> <xsl:template match="ws:shuttleBookingRequest"> <![CDATA[instance ]]><xsl:value-of select="@instanceId"/><![CDATA[ memberOf sb#shuttleBookingRequest pickupAddress hasValue ]]><xsl:value-of select="./ws:pickupAddress/@instanceId"/> <![CDATA[pickupDateAndTime hasValue ]]><xsl:value-of select="./ws:pickupDateAndTime/@instanceId"/> <![CDATA[airportName hasValue "]]><xsl:apply-templates select="ws:airportName"/><![CDATA["]]> <xsl:apply-templates select="ws:pickupAddress"/> <xsl:apply-templates select="ws:pickupDateAndTime"/> </xsl:template> <xsl:template match = "ws:pickupAddress" > <![CDATA[instance ]]><xsl:value-of select="@instanceId"/> <![CDATA[ memberOf loc#location]]> <![CDATA[ continent hasValue "]]><xsl:apply-templates select="ws:continent"/><![CDATA["]]> <![CDATA[ country hasValue "]]><xsl:apply-templates select="ws:country"/><![CDATA["]]> <![CDATA[ city hasValue "]]><xsl:apply-templates select="ws:city"/><![CDATA["]]> <![CDATA[ street hasValue ]]><xsl:apply-templates select="ws:street"/> <![CDATA[ number hasValue ]]><xsl:apply-templates select="ws:number"/> </xsl:template> <xsl:template match="ws:pickupDateAndTime"> <![CDATA[instance ]]><xsl:value-of select="@instanceId"/> <![CDATA[ memberOf dt#dateTime]]> <![CDATA[ year hasValue ]]><xsl:apply-templates select="ws:year"/> <![CDATA[ month hasValue ]]><xsl:apply-templates select="ws:month"/> <![CDATA[ day hasValue ]]><xsl:apply-templates select="ws:day"/> <![CDATA[ hour hasValue ]]><xsl:apply-templates select="ws:hour"/> <![CDATA[ minute hasValue ]]><xsl:apply-templates select="ws:minute"/> </xsl:template> <xsl:template match="ws:airportName"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:continent"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:city"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:country"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:street"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:number"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:year"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:month"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:day"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:hour"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:minute"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:second"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:shuttleRequest"> <![CDATA[instance ]]><xsl:value-of select="@instanceId"/><![CDATA[ memberOf sb#shuttleRequest selectedShuttle hasValue ]]><xsl:value-of select="./ws:selectedShuttle/@instanceId"/> <![CDATA[buyer hasValue "]]><xsl:apply-templates select="ws:buyer"/><![CDATA["]]> <xsl:apply-templates select="ws:selectedShuttle"/> </xsl:template> <xsl:template match="ws:selectedShuttle"> <![CDATA[instance ]]><xsl:value-of select="@instanceId"/><![CDATA[ memberOf sb#shuttleBookingInfo pickupAddress hasValue ]]><xsl:value-of select="./ws:pickupAddress/@instanceId"/> <![CDATA[pickupDateAndTime hasValue ]]><xsl:value-of select="./ws:pickupDateAndTime/@instanceId"/> <![CDATA[transportType hasValue ]]><xsl:apply-templates select="ws:transportType"/> <xsl:apply-templates select="ws:pickupAddress"/> <xsl:apply-templates select="ws:pickupDateAndTime"/> </xsl:template> <xsl:template match="ws:transportType"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:buyer"> <xsl:value-of select="."/> </xsl:template> </xsl:stylesheet> --- NEW FILE: shuttleOutput.xsl --- <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ws="http://sfs.atos.es/shuttleBooking" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.1"> <xsl:output method = "text" encoding="utf-8" indent="yes" /> <xsl:template match = "/" > <![CDATA[ wsmlVariant _"http://www.wsmo.org/wsml/wsml-syntax/wsml-flight" namespace{ _"http://www.infrawebs-eu.org/sfs/ontologies/shuttleBooking_output#", sb _"http://www.infrawebs-eu.org/sfs/ontologies/shuttleBooking#", dc _"http://purl.org/dc/elements/1.1#", dt _"http://www.infrawebs-eu.org/sfs/ontologies/dateTime#", bo _"http://www.infrawebs-eu.org/sfs/ontologies/booking#", sh _"http://www.infrawebs-eu.org/sfs/ontologies/shuttle#", loc _"http://www.infrawebs-eu.org/sfs/ontologies/location#", cu _"http://example.org/customer#", xsd _"http://www.w3.org/2001/XMLSchema#" } ontology _"http://www.infrawebs-eu.org/sfs/ontologies/shuttleBooking_output" importsOntology { _"http://www.infrawebs-eu.org/sfs/ontologies/shuttleBooking#", _"http://www.infrawebs-eu.org/sfs/ontologies/dateTime", _"http://www.infrawebs-eu.org/sfs/ontologies/booking", _"http://www.infrawebs-eu.org/sfs/ontologies/shuttle", _"http://www.infrawebs-eu.org/sfs/ontologies/location" } ]]> <xsl:apply-templates select="ws:availableShuttles"/> <xsl:apply-templates select="ws:shuttleBooking"/> </xsl:template> <xsl:template match="ws:availableShuttles"> <![CDATA[instance ]]><xsl:value-of select="@instanceId"/><![CDATA[ memberOf sb#availableShuttles]]> <xsl:for-each select="./ws:availableShuttlesInfo"> <![CDATA[availableShuttlesInfo hasValue ]]><xsl:value-of select="@instanceId"/> </xsl:for-each> <xsl:for-each select="."> <xsl:apply-templates select="ws:availableShuttlesInfo"/> </xsl:for-each> </xsl:template> <xsl:template match="ws:availableShuttlesInfo"> <![CDATA[instance ]]><xsl:value-of select="@instanceId"/><![CDATA[ memberOf sb#shuttleBookingInfo pickupAddress hasValue ]]><xsl:value-of select="./ws:pickupAddress/@instanceId"/> <![CDATA[pickupDateAndTime hasValue ]]><xsl:value-of select="./ws:pickupDateAndTime/@instanceId"/> <![CDATA[transportType hasValue ]]><xsl:apply-templates select="ws:transportType"/> <xsl:apply-templates select="ws:pickupAddress"/> <xsl:apply-templates select="ws:pickupDateAndTime"/> </xsl:template> <xsl:template match = "ws:pickupAddress" > <![CDATA[instance ]]><xsl:value-of select="@instanceId"/> <![CDATA[ memberOf loc#location]]> <![CDATA[ continent hasValue "]]><xsl:apply-templates select="ws:continent"/><![CDATA["]]> <![CDATA[ country hasValue "]]><xsl:apply-templates select="ws:country"/><![CDATA["]]> <![CDATA[ city hasValue "]]><xsl:apply-templates select="ws:city"/><![CDATA["]]> <![CDATA[ street hasValue ]]><xsl:apply-templates select="ws:street"/> <![CDATA[ number hasValue ]]><xsl:apply-templates select="ws:number"/> </xsl:template> <xsl:template match="ws:pickupDateAndTime"> <![CDATA[instance ]]><xsl:value-of select="@instanceId"/> <![CDATA[ memberOf dt#dateTime]]> <![CDATA[ year hasValue ]]><xsl:apply-templates select="ws:year"/> <![CDATA[ month hasValue ]]><xsl:apply-templates select="ws:month"/> <![CDATA[ day hasValue ]]><xsl:apply-templates select="ws:day"/> <![CDATA[ hour hasValue ]]><xsl:apply-templates select="ws:hour"/> <![CDATA[ minute hasValue ]]><xsl:apply-templates select="ws:minute"/> </xsl:template> <xsl:template match="ws:shuttleBooking"> <![CDATA[instance ]]><xsl:value-of select="@instanceId"/><![CDATA[ memberOf sb#shuttleBooking]]> <![CDATA[seller hasValue "]]><xsl:apply-templates select="ws:seller"/><![CDATA["]]> <![CDATA[hasBookingTicketId hasValue "]]><xsl:apply-templates select="ws:hasBookingTicketId"/><![CDATA["]]> <![CDATA[hasShuttleBookingInfo hasValue ]]><xsl:value-of select="./ws:hasShuttleBookingInfo/@instanceId"/> <xsl:apply-templates select="ws:hasShuttleBookingInfo"/> </xsl:template> <xsl:template match="ws:hasShuttleBookingInfo"> <![CDATA[instance ]]><xsl:value-of select="@instanceId"/><![CDATA[ memberOf sb#shuttleBookingInfo pickupAddress hasValue ]]><xsl:value-of select="./ws:pickupAddress/@instanceId"/> <![CDATA[pickupDateAndTime hasValue ]]><xsl:value-of select="./ws:pickupDateAndTime/@instanceId"/> <![CDATA[transportType hasValue ]]><xsl:apply-templates select="ws:transportType"/> <xsl:apply-templates select="ws:pickupAddress"/> <xsl:apply-templates select="ws:pickupDateAndTime"/> </xsl:template> <xsl:template match="ws:transportType"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:seller"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:hasBookingTicketId"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:continent"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:city"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:country"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:street"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:number"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:year"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:month"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:day"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:hour"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:minute"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="ws:second"> <xsl:value-of select="."/> </xsl:template> </xsl:stylesheet> |