<!DOCTYPE rdf:RDF
    [<!ENTITY xs "http://www.w3.org/2001/XMLSchema#">
    ]
>

<xsl:transform version="2.0"
  xmlns:order="http://www.w3.org/2002/ws/sawsdl/spec/examples/wsdl/PurchaseOrderService#"
    xmlns:po="http://org1.example.com/ontologies/PurchaseOrder#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:owl="http://www.w3.org/2002/07/owl#">

  <xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes" />
  <xsl:template match="/order:OrderRequest">
    <rdf:RDF>
      <owl:Ontology/>
      <po:OrderRequest>
        <po:hasCustomer>
          <po:Customer>
            <po:hasCustomerName>
              <po:Name>
                <po:hasLexicalRepresentation>
                  <xsl:value-of select="concat(
                    order:firstName,
                    ' ',
                    order:lastName)"/>
                </po:hasLexicalRepresentation>
              </po:Name>
            </po:hasCustomerName>
          </po:Customer>
        </po:hasCustomer>
        <po:hasLineItems>
          <po:LineItem>
            <po:hasPart>
              <po:Part>
                <po:hasPartCode>
                  <po:PartNum>
                    <po:hasLexicalRepresentation>
                      <xsl:value-of select="order:item/order:itemCode"/>
                    </po:hasLexicalRepresentation>
                  </po:PartNum>
                </po:hasPartCode>
              </po:Part>
            </po:hasPart>
            <po:hasDueDate>
              <po:Date>
                <po:hasLexicalRepresentation>
                  <xsl:value-of select="order:item/order:dueDate"/>
                </po:hasLexicalRepresentation>
              </po:Date>
            </po:hasDueDate>
            <po:hasQuantity rdf:datatype="&xs;float">
              <xsl:value-of select="order:item/order:quantity"/>
            </po:hasQuantity>
            <po:hasBillingInfo rdf:datatype="&xs;POBilling">
              <xsl:value-of select="order:item/order:billingInfo"/>
            </po:hasBillingInfo>
          </po:LineItem>
          <xsl:apply-templates select="order:OrderRequest" />
        </po:hasLineItems>
      </po:OrderRequest>
      </rdf:RDF>
    </xsl:template>
</xsl:transform> 
