src/share/vm/trace/xsl_util.xsl

Wed, 27 Apr 2016 01:25:04 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:25:04 +0800
changeset 0
f90c822e73f8
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/
changeset: 6782:28b50d07f6f8
tag: jdk8u25-b17

     1 <?xml version="1.0" encoding="utf-8"?>
     2 <!--
     3  Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
     4  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6  This code is free software; you can redistribute it and/or modify it
     7  under the terms of the GNU General Public License version 2 only, as
     8  published by the Free Software Foundation.
    10  This code is distributed in the hope that it will be useful, but WITHOUT
    11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    12  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    13  version 2 for more details (a copy is included in the LICENSE file that
    14  accompanied this code).
    16  You should have received a copy of the GNU General Public License version
    17  2 along with this work; if not, write to the Free Software Foundation,
    18  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21  or visit www.oracle.com if you need additional information or have any
    22  questions.
    23 -->
    25 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    27 <!-- utilities used when generating code -->
    29 <xsl:variable name="newline">
    30   <xsl:text>&#xA;</xsl:text>
    31 </xsl:variable>
    33 <xsl:variable name="indent1">
    34   <xsl:text>&#xA;  </xsl:text>
    35 </xsl:variable>
    37 <xsl:variable name="indent2">
    38   <xsl:text>&#xA;    </xsl:text>
    39 </xsl:variable>
    41 <xsl:variable name="indent3">
    42   <xsl:text>&#xA;      </xsl:text>
    43 </xsl:variable>
    45 <xsl:variable name="indent4">
    46   <xsl:text>&#xA;        </xsl:text>
    47 </xsl:variable>
    49 <xsl:variable name="quote">
    50   <xsl:text>"</xsl:text>
    51 </xsl:variable>
    53 <xsl:template name="file-header">
    54   <xsl:text>/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */</xsl:text>
    55 </xsl:template>
    57 <xsl:template name="string-replace-all">
    58   <xsl:param name="text" />
    59   <xsl:param name="replace" />
    60   <xsl:param name="by" />
    61   <xsl:choose>
    62     <xsl:when test="contains($text, $replace)">
    63       <xsl:value-of select="substring-before($text,$replace)" />
    64       <xsl:value-of select="$by" />
    65       <xsl:call-template name="string-replace-all">
    66         <xsl:with-param name="text" select="substring-after($text,$replace)" />
    67         <xsl:with-param name="replace" select="$replace" />
    68         <xsl:with-param name="by" select="$by" />
    69       </xsl:call-template>
    70     </xsl:when>
    71     <xsl:otherwise>
    72       <xsl:value-of select="$text" />
    73     </xsl:otherwise>
    74   </xsl:choose>
    75 </xsl:template>
    78 </xsl:stylesheet>

mercurial