1<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 2 3 version="1.0" > 4 5<!-- SQL ================ 6 7select orders.*, customers.name from orders, customers 8 9where orders.customer_id = customers.id 10 11and orders.product = "my_reference" 12 13 XSLT ================ 14 15--> 16 17<xsl:template match='/'> 18 19<root> 20 21 <xsl:apply-templates/> 22 23</root> 24 25</xsl:template> 26 27 28 29<xsl:template match='customer' > </xsl:template> 30 31<xsl:template match='orders' > </xsl:template> 32 33 34 35<xsl:template match='orders[product = "my_reference"]'> 36 37 <xsl:copy> 38 39 <xsl:apply-templates/> 40 41 </xsl:copy> 42 43 <xsl:copy-of select="id(@customer_id)"/> 44 45</xsl:template> 46 47 <!-- 48 * Licensed to the Apache Software Foundation (ASF) under one 49 * or more contributor license agreements. See the NOTICE file 50 * distributed with this work for additional information 51 * regarding copyright ownership. The ASF licenses this file 52 * to you under the Apache License, Version 2.0 (the "License"); 53 * you may not use this file except in compliance with the License. 54 * You may obtain a copy of the License at 55 * 56 * http://www.apache.org/licenses/LICENSE-2.0 57 * 58 * Unless required by applicable law or agreed to in writing, software 59 * distributed under the License is distributed on an "AS IS" BASIS, 60 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 61 * See the License for the specific language governing permissions and 62 * limitations under the License. 63 --> 64 65</xsl:stylesheet> 66