Sha256: 238a37eea362f2a61f931b644b3603c41b5b8107a718ebc2cca10875634f56e7

Contents?: true

Size: 1.38 KB

Versions: 35

Compression:

Stored size: 1.38 KB

Contents

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:param name="result-document" required="yes"/>
	<xsl:variable name="release" select="/*/@release"/>
	<xsl:variable name="target">
		<xsl:choose>
			<xsl:when test="/ONIXMessage">short</xsl:when>
			<xsl:otherwise>reference</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<xsl:variable name="dtd-url">http://www.editeur.org/onix/<xsl:value-of select="$release"/>/<xsl:value-of select="$target"/>/onix-international.dtd</xsl:variable>
	<xsl:output method="xml"/>
	<xsl:template match="/">
		<xsl:result-document href="{$result-document}" method="xml" doctype-system="{$dtd-url}">
			<xsl:apply-templates/>
		</xsl:result-document>
	</xsl:template>
	<xsl:template match="*">
		<xsl:variable name="target-name">
			<xsl:choose>
				<xsl:when test="$target='short'">
					<xsl:value-of select="@shortname"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="@refname"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:element name="{$target-name}">
			<xsl:copy-of select="@*[not(name()='refname' or name()='shortname')]"/>
			<xsl:apply-templates select="*|text()"/>
		</xsl:element>
	</xsl:template>
	<xsl:template match="text()">
		<xsl:copy/>
	</xsl:template>
</xsl:stylesheet>

Version data entries

35 entries across 35 versions & 4 rubygems

Version Path
cacofonix-0.10.3 support/switch-onix-tagnames-2.0.xsl
cacofonix-0.10.2 support/switch-onix-tagnames-2.0.xsl
cacofonix-0.10.1 support/switch-onix-tagnames-2.0.xsl
cacofonix-0.10.0 support/switch-onix-tagnames-2.0.xsl
onix2-1.0.0 support/switch-onix-tagnames-2.0.xsl
onix-0.9.5 support/switch-onix-tagnames-2.0.xsl
onix-0.9.4 support/switch-onix-tagnames-2.0.xsl
milkfarm-onix-0.8.13 support/switch-onix-tagnames-2.0.xsl
milkfarm-onix-0.8.12 support/switch-onix-tagnames-2.0.xsl
onix-0.9.3 support/switch-onix-tagnames-2.0.xsl
onix-0.9.2 support/switch-onix-tagnames-2.0.xsl
onix-0.9.1 support/switch-onix-tagnames-2.0.xsl
milkfarm-onix-0.8.11 support/switch-onix-tagnames-2.0.xsl
milkfarm-onix-0.8.10 support/switch-onix-tagnames-2.0.xsl
onix-0.9.0 support/switch-onix-tagnames-2.0.xsl
milkfarm-onix-0.8.9 support/switch-onix-tagnames-2.0.xsl
milkfarm-onix-0.8.8 support/switch-onix-tagnames-2.0.xsl
milkfarm-onix-0.8.7 support/switch-onix-tagnames-2.0.xsl
onix-0.8.5 support/switch-onix-tagnames-2.0.xsl
onix-0.8.4 support/switch-onix-tagnames-2.0.xsl