1 | <?xml version="1.0"?>
|
---|
2 | <!--
|
---|
3 | win32/defgen.xsl
|
---|
4 | This stylesheet is used to transform doc/lib[e]xslt-api.xml into a pseudo-source,
|
---|
5 | which can then be preprocessed to get the .DEF file for the Microsoft's linker.
|
---|
6 |
|
---|
7 | Use any XSLT processor to produce a file called lib[e]xslt.def.src in the win32
|
---|
8 | subdirectory, for example, run xsltproc from the win32 subdirectory:
|
---|
9 |
|
---|
10 | xsltproc -o libxslt.def.src defgen.xsl ../doc/libxslt-api.xml
|
---|
11 | xsltproc -o libexslt.def.src defgen.xsl ../doc/libexslt-api.xml
|
---|
12 |
|
---|
13 | Once that finishes, rest assured, the Makefile will know what to do with the
|
---|
14 | generated file.
|
---|
15 |
|
---|
16 | May 2003, Igor Zlatkovic <[email protected]>
|
---|
17 | -->
|
---|
18 | <!DOCTYPE xsl:stylesheet [ <!ENTITY nl '
'> ]>
|
---|
19 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
20 | <xsl:strip-space elements="*"/>
|
---|
21 | <xsl:output method="text"/>
|
---|
22 | <xsl:template match="/">
|
---|
23 | <xsl:text>LIBRARY </xsl:text>
|
---|
24 | <xsl:value-of select="/api/@name"/>
|
---|
25 | <xsl:text>&nl;</xsl:text>
|
---|
26 | <xsl:text>EXPORTS&nl;</xsl:text>
|
---|
27 | <xsl:for-each select="/api/symbols/*[self::variable or self::function]">
|
---|
28 | <xsl:if test="@name='xsltExtFunctionLookup' or
|
---|
29 | @name='xsltMatchPattern'">
|
---|
30 | <xsl:text>/*</xsl:text>
|
---|
31 | </xsl:if>
|
---|
32 | <xsl:value-of select="@name"/>
|
---|
33 | <xsl:if test="self::variable">
|
---|
34 | <xsl:text> DATA</xsl:text>
|
---|
35 | </xsl:if>
|
---|
36 | <xsl:if test="@name='xsltExtFunctionLookup' or
|
---|
37 | @name='xsltMatchPattern'">
|
---|
38 | <xsl:text>*/</xsl:text>
|
---|
39 | </xsl:if>
|
---|
40 | <xsl:text>&nl;</xsl:text>
|
---|
41 | </xsl:for-each>
|
---|
42 | </xsl:template>
|
---|
43 | </xsl:stylesheet>
|
---|
44 |
|
---|