summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/xsl/xslt-relative-path.xml
blob: e7bce63a8a135602525ff80de79f0326a387ff6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="#stylesheet"?>
<!DOCTYPE doc [
<!ELEMENT xsl:stylesheet ANY>
<!ATTLIST xsl:stylesheet id ID #REQUIRED>
]>
<doc>

  <xsl:stylesheet version="1.0" id="stylesheet" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="xsl:stylesheet"/>
    
    <xsl:variable name="method1">file:resources/findme.xml</xsl:variable>
    <xsl:variable name="method2">resources/findme.xml</xsl:variable>

    <xsl:template match="doc">
      <html>
        <head>
          <title>Testing Webkit</title>
        </head>

        <body>
          <p>Here is an attempt to extract the string "Hello, Webkit!" from the file findme.xml:</p>

          <p>using document('<xsl:value-of select="$method1"/>'):
            <xsl:value-of select="document($method1)/foo/bar"/></p>
          <p>using document('<xsl:value-of select="$method2"/>'):
            <xsl:value-of select="document($method2)/foo/bar"/></p>
          
        </body>
      </html>
    </xsl:template>

  </xsl:stylesheet>
</doc>