1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
3 | version="1.0">
|
---|
4 |
|
---|
5 | <xsl:output method="text"/>
|
---|
6 |
|
---|
7 | <xsl:param name="property"/>
|
---|
8 |
|
---|
9 | <xsl:template match="/">
|
---|
10 | <xsl:variable name="prop" select="job/property[@name = $property]"/>
|
---|
11 | <xsl:choose>
|
---|
12 | <xsl:when test="$prop">
|
---|
13 | <xsl:apply-templates select="$prop/*"/>
|
---|
14 | </xsl:when>
|
---|
15 | <xsl:when test="$property = 'canditopicslist'">
|
---|
16 | <xsl:apply-templates select="job/files/file[@non-conref-target = 'true']"/>
|
---|
17 | </xsl:when>
|
---|
18 | <xsl:when test="$property = 'chunkedditamaplist'">
|
---|
19 | <xsl:apply-templates select="job/files/file[@chunked-ditamap = 'true']"/>
|
---|
20 | </xsl:when>
|
---|
21 | <xsl:when test="$property = 'chunkedtopiclist'">
|
---|
22 | <xsl:apply-templates select="job/files/file[@chunked = 'true']"/>
|
---|
23 | </xsl:when>
|
---|
24 | <xsl:when test="$property = 'codereflist'">
|
---|
25 | <xsl:apply-templates select="job/files/file[@has-coderef = 'true']"/>
|
---|
26 | </xsl:when>
|
---|
27 | <xsl:when test="$property = 'conreflist'">
|
---|
28 | <xsl:apply-templates select="job/files/file[@has-conref = 'true']"/>
|
---|
29 | </xsl:when>
|
---|
30 | <xsl:when test="$property = 'conrefpushlist'">
|
---|
31 | <xsl:apply-templates select="job/files/file[@conrefpush = 'true']"/>
|
---|
32 | </xsl:when>
|
---|
33 | <xsl:when test="$property = 'conreftargetslist'">
|
---|
34 | <xsl:apply-templates select="job/files/file[@conref-target = 'true']"/>
|
---|
35 | </xsl:when>
|
---|
36 | <xsl:when test="$property = 'copytosourcelist'">
|
---|
37 | <xsl:apply-templates select="job/files/file[@copy-to-source = 'true']"/>
|
---|
38 | </xsl:when>
|
---|
39 | <xsl:when test="$property = 'flagimagelist'">
|
---|
40 | <xsl:apply-templates select="job/files/file[@flag-image = 'true']"/>
|
---|
41 | </xsl:when>
|
---|
42 | <xsl:when test="$property = 'fullditamaplist'">
|
---|
43 | <xsl:apply-templates select="job/files/file[@format = 'ditamap' and @active = 'true']"/>
|
---|
44 | </xsl:when>
|
---|
45 | <xsl:when test="$property = 'fullditamapandtopiclist'">
|
---|
46 | <xsl:apply-templates select="job/files/file[(@format = 'ditamap' or @format = 'dita') and @active = 'true']"/>
|
---|
47 | </xsl:when>
|
---|
48 | <xsl:when test="$property = 'fullditatopiclist'">
|
---|
49 | <xsl:apply-templates select="job/files/file[@format = 'dita' and @active = 'true']"/>
|
---|
50 | </xsl:when>
|
---|
51 | <xsl:when test="$property = 'hrefditatopiclist'">
|
---|
52 | <xsl:apply-templates select="job/files/file[@has-link = 'true']"/>
|
---|
53 | </xsl:when>
|
---|
54 | <xsl:when test="$property = 'hreftargetslist'">
|
---|
55 | <xsl:apply-templates select="job/files/file[@target = 'true']"/>
|
---|
56 | </xsl:when>
|
---|
57 | <xsl:when test="$property = 'htmllist'">
|
---|
58 | <xsl:apply-templates select="job/files/file[@format = 'html']"/>
|
---|
59 | </xsl:when>
|
---|
60 | <xsl:when test="$property = 'imagelist'">
|
---|
61 | <xsl:apply-templates select="job/files/file[@format = 'image']"/>
|
---|
62 | </xsl:when>
|
---|
63 | <xsl:when test="$property = 'keyreflist'">
|
---|
64 | <xsl:apply-templates select="job/files/file[@has-keyref = 'true']"/>
|
---|
65 | </xsl:when>
|
---|
66 | <xsl:when test="$property = 'outditafileslist'">
|
---|
67 | <xsl:apply-templates select="job/files/file[@out-dita = 'true']"/>
|
---|
68 | </xsl:when>
|
---|
69 | <xsl:when test="$property = 'resourceonlylist'">
|
---|
70 | <xsl:apply-templates select="job/files/file[@resource-only = 'true']"/>
|
---|
71 | </xsl:when>
|
---|
72 | <xsl:when test="$property = 'skipchunklist'">
|
---|
73 | <xsl:apply-templates select="job/files/file[@skip-chunk = 'true']"/>
|
---|
74 | </xsl:when>
|
---|
75 | <xsl:when test="$property = 'subjectschemelist'">
|
---|
76 | <xsl:apply-templates select="job/files/file[@subjectscheme = 'true']"/>
|
---|
77 | </xsl:when>
|
---|
78 | <xsl:when test="$property = 'subtargetslist'">
|
---|
79 | <xsl:apply-templates select="job/files/file[@subtarget = 'true']"/>
|
---|
80 | </xsl:when>
|
---|
81 | <xsl:otherwise>
|
---|
82 | <xsl:message terminate="yes">ERROR: Unrecognized property '<xsl:value-of select="$property"/>'</xsl:message>
|
---|
83 | </xsl:otherwise>
|
---|
84 | </xsl:choose>
|
---|
85 |
|
---|
86 | </xsl:template>
|
---|
87 |
|
---|
88 | <xsl:template match="set">
|
---|
89 | <xsl:for-each select="string">
|
---|
90 | <xsl:if test="not(position() = 1)"><xsl:text>
</xsl:text></xsl:if>
|
---|
91 | <xsl:apply-templates select="."/>
|
---|
92 | </xsl:for-each>
|
---|
93 | </xsl:template>
|
---|
94 |
|
---|
95 | <xsl:template match="string">
|
---|
96 | <xsl:value-of select="."/>
|
---|
97 | </xsl:template>
|
---|
98 |
|
---|
99 | <xsl:template match="file">
|
---|
100 | <xsl:if test="not(position() = 1)"><xsl:text>
</xsl:text></xsl:if>
|
---|
101 | <xsl:value-of select="@path"/>
|
---|
102 | </xsl:template>
|
---|
103 |
|
---|
104 | </xsl:stylesheet>
|
---|