/var/lib/virtuoso-opensource-6.1/vsp/vsmx/vsmx_msg.xsl is in virtuoso-vsp-startpage 6.1.4+dfsg1-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | <?xml version="1.0"?>
<!--
-
- $Id: vsmx_msg.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2006 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY soapencuri "http://schemas.xmlsoap.org/soap/encoding/">
<!ENTITY wsdluri "http://schemas.xmlsoap.org/wsdl/">
<!ENTITY xsiuri "http://www.w3.org/2001/XMLSchema-instance">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:virt="http://www.openlinksw.com/virtuoso/xslt"
xmlns:bpelv="http://www.openlinksw.com/virtuoso/bpel"
xmlns:pl="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:vi="http://www.openlinksw.com/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsi="&xsiuri;"
xmlns:wsdl="&wsdluri;"
xmlns:soapenc="&soapencuri;"
>
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" encoding="utf-8"/>
<xsl:param name="msg"/>
<xsl:param name="typ"/>
<xsl:param name="inidepth" select="5"/>
<xsl:template match="wsdl:message[vi:split-name (@name,1)=$msg]">
<xsl:for-each select="wsdl:part">
<xsl:choose>
<xsl:when test="@type">
<xsl:variable name="nam" select="vi:split-name (@type,1)"/>
<xsl:variable name="tns" select="vi:split-name (@type,0)"/>
<xsl:element name="{@name}">
<xsl:attribute name="type" namespace="&xsiuri;"><xsl:value-of select="@type"/></xsl:attribute>
<xsl:apply-templates
select="//xsd:schema[@targetNamespace = $tns]/xsd:complexType[@name = $nam]"
mode="gen">
<xsl:with-param name="depth" select="$inidepth"/>
</xsl:apply-templates>
</xsl:element>
</xsl:when>
<xsl:when test="@element">
<xsl:variable name="nam" select="vi:split-name (@element,1)"/>
<xsl:variable name="tns" select="vi:split-name (@element,0)"/>
<xsl:apply-templates
select="//xsd:schema[@targetNamespace = $tns]/xsd:element[@name = $nam]" mode="gen">
<xsl:with-param name="depth" select="$inidepth"/>
</xsl:apply-templates>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template match="xsd:complexType[@name=vi:split-name($typ,1) and //xsd:schema[@targetNamespace = vi:split-name($typ,0)]]">
<stub>
<xsl:apply-templates select="node()" mode="gen">
<xsl:with-param name="depth" select="1"/>
</xsl:apply-templates>
</stub>
</xsl:template>
<xsl:template match="xsd:element" mode="gen">
<xsl:param name="depth" />
<xsl:param name="max"/>
<xsl:variable name="ns" select="ancestor::xsd:schema/@targetNamespace"/>
<xsl:variable name="pname" select="ancestor::xsd:complexType/@name"/>
<!--xsl:comment>depth:<xsl:value-of select="$depth"/></xsl:comment-->
<xsl:choose>
<xsl:when test="$max">
<xsl:variable name="rpt" select="$max - 1"/>
</xsl:when>
<xsl:when test="@minOccurs">
<xsl:variable name="rpt" select="number(@minOccurs) - 1"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="rpt" select="0"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@ref">
<xsl:variable name="nam" select="vi:split-name (@ref,1)"/>
<xsl:variable name="tns" select="vi:split-name (@ref,0)"/>
<xsl:apply-templates
select="//xsd:schema[@targetNamespace = $tns]/xsd:element[@name = $nam]" mode="gen">
<xsl:with-param name="depth" select="$depth"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:element name="{@name}" namespace="{$ns}">
<xsl:choose>
<xsl:when test="vi:split-name (@type,1) = $pname and vi:split-name (@type,0) = $ns">
<xsl:copy-of select="@type"/>
<!--xsl:attribute name="nil" namespace="&xsiuri;">1</xsl:attribute-->
</xsl:when>
<xsl:when test="@type">
<xsl:variable name="nam" select="vi:split-name (@type,1)"/>
<xsl:variable name="tns" select="vi:split-name (@type,0)"/>
<xsl:copy-of select="@type"/>
<xsl:apply-templates
select="//xsd:schema[@targetNamespace = $tns]/xsd:complexType[@name = $nam]" mode="gen">
<xsl:with-param name="depth" select="$depth"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="xsd:complexType">
<xsl:apply-templates select="xsd:complexType" mode="gen">
<xsl:with-param name="depth" select="$depth"/>
</xsl:apply-templates>
</xsl:when>
</xsl:choose>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="$rpt > 0">
<xsl:apply-templates select="." mode="gen">
<xsl:with-param name="depth" select="$depth"/>
<xsl:with-param name="max" select="$rpt"/>
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<xsl:template match="xsd:complexType" mode="gen">
<xsl:param name="depth"/>
<xsl:variable name="nam" select="vi:split-name (@name,1)"/>
<xsl:variable name="tns" select="vi:split-name (@name,0)"/>
<xsl:choose>
<xsl:when test="$depth < 0" />
<xsl:when test="xsd:sequence|xsd:all|xsd:any">
<xsl:apply-templates select="xsd:*/xsd:element" mode="gen">
<xsl:with-param name="depth" select="$depth - 1"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="xsd:complexContent">
<xsl:apply-templates select="xsd:*" mode="gen">
<xsl:with-param name="depth" select="$depth"/>
</xsl:apply-templates>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="xsd:restriction|xsd:extension" mode="gen">
<xsl:param name="depth"/>
<xsl:variable name="nam" select="vi:split-name (@base,1)"/>
<xsl:variable name="tns" select="vi:split-name (@base,0)"/>
<!--xsl:comment><xsl:value-of select="$nam"/></xsl:comment-->
<xsl:choose>
<xsl:when test="$nam = 'Array' and $tns = '&soapencuri;'">
<xsl:variable name="anam" select="vi:split-name (xsd:sequence/xsd:element/@type,1)"/>
<xsl:variable name="atns" select="vi:split-name (xsd:sequence/xsd:element/@type,0)"/>
<xsl:element name="item">
<xsl:apply-templates
select="//xsd:schema[@targetNamespace = $atns]/xsd:complexType[@name = $anam]" mode="gen">
<xsl:with-param name="depth" select="$depth"/>
</xsl:apply-templates>
</xsl:element>
<xsl:attribute name="arrayType" namespace="&wsdluri;"><xsl:value-of select="$anam"/>[1]</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates
select="//xsd:schema[@targetNamespace = $tns]/xsd:complexType[@name = $nam]" mode="gen">
<xsl:with-param name="depth" select="$depth"/>
</xsl:apply-templates>
<xsl:apply-templates select="xsd:*/xsd:element" mode="gen">
<xsl:with-param name="depth" select="$depth - 1"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="text()" mode="gen"/>
<xsl:template match="text()"/>
</xsl:stylesheet>
|