1<?xml version="1.0"?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 3 4 <!-- FileName: select59 --> 5 <!-- Document: http://www.w3.org/TR/Xpath --> 6 <!-- DocVersion: 19991116 --> 7 <!-- Section: 3.3 Node Sets --> 8 <!-- Purpose: test union operator using overlapping node-sets. Results should 9 always be output in doc order regardless of order of select attribute. --> 10 <!-- Creator: Carmelo Montanez (original) --><!-- Expression019 in NIST suite --> 11 <!-- Creator: Paul Dick (this version) --> 12 13<xsl:key name="which" match="child" use="@wide|@deep"/> 14<xsl:key name="one" match="child" use="@deep"/> 15<xsl:key name="two" match="child" use="@wide"/> 16 17<xsl:template match="doc"> 18 <out><xsl:text> 19</xsl:text> 20<xsl:apply-templates select = "child[@wide='3']|child[@deep='3']"/>, 21<xsl:apply-templates select = "child[@deep='3']|child[@wide='3']"/>, 22<xsl:apply-templates select = "key('which','3')"/>, 23<xsl:apply-templates select = "key('one','3') | key('two','3')"/>, 24<xsl:apply-templates select = "child[@wide='3'] | key('one','3')"/>, 25<xsl:apply-templates select = "key('two','3') | document('select59.xml')/child[@wide='3'] | child[@deep='3']"/>, 26</out> 27</xsl:template> 28 29<xsl:template match = "*"> 30<xsl:value-of select = "."/> 31</xsl:template> 32 33 34 <!-- 35 * Licensed to the Apache Software Foundation (ASF) under one 36 * or more contributor license agreements. See the NOTICE file 37 * distributed with this work for additional information 38 * regarding copyright ownership. The ASF licenses this file 39 * to you under the Apache License, Version 2.0 (the "License"); 40 * you may not use this file except in compliance with the License. 41 * You may obtain a copy of the License at 42 * 43 * http://www.apache.org/licenses/LICENSE-2.0 44 * 45 * Unless required by applicable law or agreed to in writing, software 46 * distributed under the License is distributed on an "AS IS" BASIS, 47 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 48 * See the License for the specific language governing permissions and 49 * limitations under the License. 50 --> 51 52</xsl:stylesheet> 53