private File leftDir = null;
// private String leftStatus;
private String leftMilestone = "";
-
+
private String rightVer;
private File rightDir = null;
// private String rightStatus;
private String rightMilestone = "";
- private InputStream dumpCppXsltStream = null;
+ private InputStream dumpCppXsltStream = null;
private InputStream dumpCXsltStream = null;
private InputStream reportXslStream = null;
private static final String CXSLT = "dumpAllCFunc.xslt";
- private static final String CPPXSLT = "dumpAllCppFunc.xslt";
+ private static final String CPPXSLT = "dumpAllCppFunc.xslt";
private static final String RPTXSLT = "genReport.xslt";
private File dumpCppXslt;
private File dumpCXslt;
private File reportXsl;
private File resultFile;
-
+
static Map<String,Set<String>> simplifications = new TreeMap<String,Set<String>>();
-
+
static void addSimplification(String prototype0, String prototype) {
Set<String> s = simplifications.get(prototype);
if(s==null) {
return output;
}
-
- final private static String nul = "None";
+
+ final private static String notFound = "(missing)";
public static void main(String[] args) throws TransformerException, ParserConfigurationException, SAXException, IOException, XPathExpressionException {
-
+
StableAPI t = new StableAPI();
- t.run(args);
+ t.run(args);
}
-
+
private void run(String[] args) throws XPathExpressionException, TransformerException, ParserConfigurationException, SAXException, IOException {
this.parseArgs(args);
Set<JoinedFunction> full = new TreeSet<JoinedFunction>();
Set<JoinedFunction> setCpp = this.getFullList(dumpCppXsltStream, CPPXSLT);
full.addAll(setCpp);
System.out.println("read "+setCpp.size() +" C++. Reading C:");
-
+
Set<JoinedFunction> setC = this.getFullList(dumpCXsltStream, CXSLT);
full.addAll(setC);
System.out.println("read "+setC.size() +" C. Setting node:");
-
+
Node fullList = this.setToNode(full);
// t.dumpNode(fullList,"");
-
+
System.out.println("Node set. Reporting:");
-
+
this.reportSelectedFun(fullList);
System.out.println("Done. Please check " + this.resultFile);
} else {
System.out.println("Unknown option: "+arg);
printUsage();
- }
+ }
}
dumpCppXsltStream = loadStream(CPPXSLT, "--cppxslt", dumpCppXslt);
} catch (IOException ioe) {
throw new RuntimeException("Error: Could not load " + argName +" " + argFile.getPath() + " - " + ioe.toString(), ioe);
}
- } else {
+ } else {
stream = StableAPI.class.getResourceAsStream(name);
if(stream == null) {
throw new InternalError("No resource found for " + StableAPI.class.getPackage().getName()+"/"+ name + " - use " + argName);
}
private static Set<String> warnSet = new TreeSet<String>();
-
+
private static void warn(String what) {
if(!warnSet.contains(what)) {
System.out.println("Warning: "+what);
}
warnSet.add(what);
}
- }
-
+ }
+
private static boolean didWarnSuperTrim = false;
-
+
private static String trimICU(String ver) {
final String ICU_ = ICU_SPACE_PREFIX;
final String ICU = "ICU";
warn("Trimming text before 'ICU ': " + ver.substring(0,icuidx1+ICU.length()));
ver = ver.substring(icuidx1+ICU.length()).trim();
}
-
+
// always trim anything after a version #
{
int n;
}
}
}
- }
+ }
return ver;
}
-
+
private String setVer(String prevVer, String whichVer, File dir) {
String UVERSION = UVERSIONA;
if(dir==null) {
}
Node name = (Node)xpath.evaluate(NAME_XPATH, ln, XPathConstants.NODE);
if(name==null) continue;
-
+
// System.err.println("Gotta node: " + name);
-
+
Node nameVal = name.getFirstChild();
if(nameVal==null) nameVal = name;
-
+
String nameStr = nameVal.getNodeValue();
if(nameStr==null) continue;
// System.err.println("Gotta name: " + nameStr);
-
+
if(nameStr.trim().equals(U_ICU_VERSION)) {
Node initializer = (Node)xpath.evaluate(INITIALIZER_XPATH, ln, XPathConstants.NODE);
if(initializer==null) System.err.println("initializer with no value");
System.err.println("Detected "+whichVer + " version: " + result);
String milestoneOf = "";
-
- // TODO: #1 use UVersionInfo. (this tool doesn't depend on ICU4J yet)
+
+ // TODO: #1 use UVersionInfo. (this tool doesn't depend on ICU4J yet)
// #2 move this to a utility function: strip/"explain" an ICU version #.
if(result.startsWith("ICU ")) {
String vers[] = result.substring(4).split("\\.");
int patch = vers.length>3?Integer.parseInt(vers[3]):0;
System.err.println(" == ["+vers.toString()+"] " + maj + " . " + min + " . " + micr + " . " + patch );
if(maj >= 49) {
- // new scheme: 49 and following.
+ // new scheme: 49 and following.
String truncVersion = "ICU " +maj;
if(min == 0) {
milestoneOf = " (m"+micr+")";
}
}
}
-
+
}
//dumpNode(defines,"");
} catch(Throwable t) {
System.err.println("Warning: Couldn't get " + whichVer+ " version from "+ UVERSION + " - reverting to " + prevVer);
result = prevVer;
}
-
+
if(result != null) {
-
+
}
-
+
if(prevVer != null) {
if(result != null) {
- if(!result.equals(prevVer)) {
+ if(!result.equals(prevVer)) {
System.err.println("Note: Detected " + result + " version but we'll use your requested --"+whichVer+"ver "+prevVer);
result = prevVer;
if(!rightMilestone.isEmpty()&&whichVer.equals("new")) {
}
}
}
-
+
if(result == null) {
System.err.println("prevVer="+prevVer);
System.err.println("Error: You'll need to use the option \"--"+whichVer+"ver\" because we could not detect an ICU version in " + UVERSION );
throw new InternalError("Error: You'll need to use the option \"--"+whichVer+"ver\" because we could not detect an ICU version in " + UVERSION );
}
-
-
-
+
+
+
return result;
}
-
+
private static void printUsage(){
System.out.println("Usage: StableAPI option* target*");
System.out.println();
return "(Node: " + node.toString() + " )";
// return node.getFirstChild().getAttributes().getNamedItem(attrName).getNodeValue();
}
-
+
try {
return node.getAttributes().getNamedItem(attrName).getNodeValue();
} catch(NullPointerException npe) {
if(node.getAttributes()==null) {
throw new InternalError("[no attributes Can't get attr "+attrName +" out of node " + node.getNodeName()+":"+node.getNodeType()+":"+node.getNodeValue()+"@"+node.getTextContent());
} else if(node.getAttributes().getNamedItem(attrName)==null) {
- return null;
+ return null;
//throw new InternalError("No attribute named: "+attrName);
} else {
System.err.println("Can't get attr "+attrName+": "+npe.toString());
throw new InternalError("Can't get attr "+attrName);
}
}
-
+
static String getAttr(NamedNodeMap attrList, String attrName){
return attrList.getNamedItem(attrName).getNodeValue();
}
-
+
static class Function implements Comparable<Function> {
public String prototype;
public String id;
static Function fromXml(Node n){
Function f = new Function();
f.prototype = getAttr(n, "prototype");
-
+
if("yes".equals(getAttr(n, "static"))&&!f.prototype.contains("static")) {
f.prototype = "static ".concat(f.prototype);
}
-
+
f.id = getAttr(n, "id");
f.status = getAttr(n, "status");
f.version = trimICU(getAttr(n, "version"));
f.file = getAttr(n, "file");
f.purifyPrototype();
-
+
f.simplifyPrototype();
if(f.file == null) {
f.comparableName = f.comparableName();
return f;
}
-
+
/**
* Convert string to basename.
* @param str
str = i == -1 ? str : str.substring(i+1);
return str;
}
-
+
static private String replList[] = { "[ ]*\\([ ]*void[ ]*\\)[ ]*", "()", // cleanup
" , ", ", ", // cleanup
/**
* these are noted as deltas.
*/
- static private String simplifyList[] = {
+ static private String simplifyList[] = {
"[ ]*=[ ]*0[ ]*$", "", // remove pure virtual - TODO: notify about this difference, separately
"\\)[ ]*const[ ]*$", ")", // TODO: notify about this difference, separately - remove const from function type
};
/**
* Special cases:
- *
+ *
* Remove the status attribute embedded in the C prototype
- *
+ *
* Remove the virtual keyword in Cpp prototype
*/
private void purifyPrototype(){
prototype = prototype.replaceAll(s,"");
prototype = prototype.trim();
}
-
+
for (int i = 0; i < replList.length; i+= 2) {
prototype = prototype.replaceAll(replList[i+0],replList[i+1]);
}
-
-
+
+
prototype = prototype.trim();
// Now, remove parameter names!
StringBuffer in = new StringBuffer(prototype);
int openParen = in.indexOf("(");
int closeParen = in.lastIndexOf(")");
-
+
if(openParen==-1 || closeParen==-1) return; // exit, malformed?
if(openParen+1==closeParen) return; // exit: ()
-
+
out.append(in, 0, openParen+1); // prelude
-
+
for(int left = openParen+1; left<closeParen;) {
int right = in.indexOf(",", left+1); // right edge
if(right>=closeParen || right==-1 ) right=closeParen; // found last comma
-
+
// System.err.println("Considering " + left + " / " + right + " - " + closeParen + " : " + in.substring(left, right));
-
- if(left==right) continue;
-
+
+ if(left==right) continue;
+
// find variable name
int rightCh = right-1;
if(rightCh==left) { // 1 ch- break
while(nameStartCh>left && Character.isJavaIdentifierPart(in.charAt(nameStartCh))) {
nameStartCh--;
}
-
+
// now, did we find something to skip?
if(nameStartCh>left && nameEndCh>nameStartCh) {
out.append(in, left, nameStartCh+1);
// pass through
out.append(in, left, right);
}
-
+
left = right;
}
-
+
out.append(in, closeParen, in.length()); // postlude
-
+
// Delete any doubled whitespace.
for(int p=1;p<out.length();p++) {
- char prev = out.charAt(p-1);
+ char prev = out.charAt(p-1);
if(Character.isWhitespace(prev)) {
while (out.length()>p&&(Character.isWhitespace(out.charAt(p)))) {
out.deleteCharAt(p);
}
}
}
-
+
// System.err.println(prototype+" -> " + out.toString());
prototype = out.toString();
}
public int compareTo(Function o) {
return comparableName.compareTo(((Function)o).comparableName);
}
- public String comparableName() {
+ public String comparableName() {
return file+"|"+prototype+"|"+status+"|"+version+"|"+id;
}
}
-
+
static class JoinedFunction implements Comparable<JoinedFunction> {
public String prototype;
public String leftRefId;
public String rightRefId;
public String rightStatus;
public String rightFile;
-
+
public String comparableName;
-
+
static JoinedFunction fromLeftFun(Function left){
JoinedFunction u = new JoinedFunction();
u.prototype = left.prototype;
u.leftRefId = left.id;
u.leftStatus = left.status;
u.leftFile = left.file;
- u.rightRefId = nul;
+ u.rightRefId = notFound;
// u.rightVersion = nul;
u.leftVersion = left.version;
- u.rightStatus = nul;
- u.rightFile = nul;
+ u.rightStatus = notFound;
+ u.rightFile = notFound;
u.comparableName = left.comparableName;
return u;
}
-
+
static JoinedFunction fromRightFun(Function right){
JoinedFunction u = new JoinedFunction();
u.prototype = right.prototype;
- u.leftRefId = nul;
- u.leftStatus = nul;
- u.leftFile = nul;
+ u.leftRefId = notFound;
+ u.leftStatus = notFound;
+ u.leftFile = notFound;
// u.leftVersion = nul;
u.rightVersion = right.version;
u.rightRefId = right.id;
u.comparableName = right.comparableName;
return u;
}
-
+
static JoinedFunction fromTwoFun(Function left, Function right){
if (!left.equals(right)) throw new Error();
JoinedFunction u = new JoinedFunction();
Element ele = doc.createElement("func");
ele.setAttribute("prototype", formatCode(prototype));
// ele.setAttribute("leftRefId", leftRefId);
-
+
ele.setAttribute("leftStatus", leftStatus);
// ele.setAttribute("rightRefId", rightRefId);
ele.setAttribute("rightStatus", rightStatus);
ele.setAttribute("leftVersion", leftVersion);
// ele.setAttribute("rightRefId", rightRefId);
ele.setAttribute("rightVersion", rightVersion);
-
-
-// String f = rightRefId.equals(nul) ? leftRefId : rightRefId;
+
+
+// String f = rightRefId.equals(notFound) ? leftRefId : rightRefId;
// int tail = f.indexOf("_");
// f = tail != -1 ? f.substring(0, tail) : f;
// f = f.startsWith("class") ? f.replaceFirst("class","") : f;
- String f = rightFile.equals(nul) ? leftFile : rightFile;
+ String f = rightFile.equals(notFound) ? leftFile : rightFile;
ele.setAttribute("file", f);
return ele;
}
-
+
public int compareTo(JoinedFunction o) {
return comparableName.compareTo(o.comparableName);
}
-
+
public boolean equals(Function right){
return this.prototype.equals(right.prototype);
}
t = transFac.newTransformer(ss);
} catch (TransformerConfigurationException e) {
e.printStackTrace();
- throw new InternalError("Couldn't make transformer for " + name + " - " + e.getMessageAndLocation());
+ throw new InternalError("Couldn't make transformer for " + name + " - " + e.getMessageAndLocation());
}
if(t == null) {
throw new InternalError("Couldn't make transformer for " + name);
report.setParameter("rightMilestone", rightMilestone);
report.setParameter("leftMilestone", leftMilestone);
report.setParameter("dateTime", new GregorianCalendar().getTime());
- report.setParameter("nul", nul);
-
+ report.setParameter("notFound", notFound);
+
DOMSource src = new DOMSource(joinedNode);
Result res = new StreamResult(resultFile);
report.transform(src, res);
// dumpNode(res.getNode(),"");
}
-
+
private Set<JoinedFunction> getFullList(InputStream dumpXsltStream, String dumpXsltFile) throws TransformerException, ParserConfigurationException, XPathExpressionException, SAXException, IOException{
// prepare transformer
XPath xpath = XPathFactory.newInstance().newXPath();
System.err.flush();
throw new InternalError("getFullList("+dumpXsltFile.toString()+") returned a null left "+expression);
}
-
+
xpath.reset(); // reuse
-
+
DOMSource rightIndex = new DOMSource(getDocument(new File(rightDir,INDEX_XML)));
DOMResult rightResult = new DOMResult();
transformer.setParameter(DOC_FOLDER, rightDir);
throw new InternalError("getFullList("+dumpXsltFile.toString()+") returned a null right "+expression);
}
// dumpNode(rightList,"");
-
-
+
+
Set<Function> leftSet = nodeToSet(leftList);
Set<Function> rightSet = nodeToSet(rightList);
Set<JoinedFunction> joined = fullJoin(leftSet, rightSet);
JoinedFunction fun = iter.next();
root.appendChild(fun.toXml(doc));
}
-
+
// add the 'changed' stuff
Element root2 = doc.createElement("simplifications");
root.appendChild(root2);
Element baseElement = doc.createElement("base");
baseElement.appendChild(doc.createTextNode(simplification));
subSimplification.appendChild(baseElement);
-
+
root2.appendChild(subSimplification);
-
+
for(String change : simplifications.get(simplification)) {
Element changeElement = doc.createElement("change");
changeElement.appendChild(doc.createTextNode(change));
}
}
}
-
+
return doc;
}
/**
- * full-join two Set on 'prototype'
- *
+ * full-join two Set on 'prototype'
+ *
* @param left Set<Fun>
* @param right Set<Fun>
* @return Set<JoinedFun>
joined.add(JoinedFunction.fromTwoFun(f1, f2));
right.remove(f2);
break;
- }
+ }
}
}
Function f = iter.next();
left.remove(f);
}
-
+
for (Iterator<Function> iter = left.iterator(); iter.hasNext();) {
Function f = iter.next();
joined.add(JoinedFunction.fromLeftFun(f));
}
-
+
for (Iterator<Function> iter = right.iterator(); iter.hasNext();) {
Function f = iter.next();
joined.add(JoinedFunction.fromRightFun(f));
}
return joined;
}
-
+
private static void dumpNode(Node n) {
dumpNode(n,"");
}
}
System.out.println(opre + "</" + n.getNodeName() + ">");
}
-
+
private static DocumentBuilder theBuilder = null;
private static DocumentBuilderFactory dbf = null;
private synchronized static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException {
}
return theBuilder;
}
-
+
private static Document getDocument(File file) throws ParserConfigurationException, SAXException, IOException{
FileInputStream fis = new FileInputStream(file);
InputSource inputSource = new InputSource(fis);
}
static boolean tried = false;
static Formatter aFormatter = null;
-
+
public interface Formatter {
public String formatCode(String s);
}
-
+
public static String format_keywords[] = {
"enum","#define","static"
};
-
+
/**
* Attempt to use a pretty formatter
* @param prototype2
}
return str;
}
-
+
};
}
tried = true;
public static String HTMLSafe(String s) {
if(s==null) return null;
-
- return
+
+ return
s.replaceAll("&","&")
.replaceAll("<","<")
.replaceAll(">",">")
.replaceAll("\"",""");
}
-
-
+
+
}
<!--
/*
*******************************************************************************
-* Copyright (C) 2008-2012, International Business Machines Corporation and *
+* Copyright (C) 2008-2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
-* This is the XSLT for the API Report.
+* This is the XSLT for the API Report.
*/
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="dateTime" />
<xsl:param name="rightMilestone" />
<xsl:param name="leftMilestone" />
- <xsl:param name="nul" />
+ <xsl:param name="notFound" />
<xsl:param name="ourYear" />
- <xsl:output method="html" version="4.0" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
+ <xsl:output method="html" version="4.0" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
omit-xml-declaration="yes" encoding="utf-8" indent="yes"/>
-
+
<xsl:template match="/">
<html>
<xsl:comment>
- Copyright (C) <xsl:value-of select="$ourYear" />, International Business Machines Corporation, All Rights Reserved.
+ Copyright (C) <xsl:value-of select="$ourYear" />, International Business Machines Corporation, All Rights Reserved.
</xsl:comment>
<head>
<title>ICU4C API Comparison: <xsl:value-of select="$leftVer"/><xsl:value-of select="$leftMilestone" /> with <xsl:value-of select="$rightVer" /><xsl:value-of select="$rightMilestone" /> </title>
<link rel="stylesheet" href="icu4c.css" type="text/css" />
</head>
-
+
<body>
-
+
<a name="#_top"></a>
-
+
<h1>ICU4C API Comparison: <xsl:value-of select="$leftVer"/><xsl:value-of select="$leftMilestone" /> with <xsl:value-of select="$rightVer" /><xsl:value-of select="$rightMilestone" /> </h1>
-
+
<div id="toc">
<ul>
<li><a href="#removed">Removed from <xsl:value-of select="$leftVer"/></a></li>
</ul>
<hr />
</div>
-
+
<a name="removed"></a>
<h2>Removed from <xsl:value-of select="$leftVer"/> </h2>
<xsl:call-template name="genTable">
- <xsl:with-param name="nodes" select="/list/func[@rightStatus=$nul]"/>
+ <xsl:with-param name="nodes" select="/list/func[@rightStatus=$notFound]"/>
</xsl:call-template>
<P/><a href="#_top">(jump back to top)</a><hr/>
<a name="changed"></a>
<h2>Changed in <xsl:value-of select="$rightVer" /> (old, new)</h2>
<xsl:call-template name="genTable">
- <xsl:with-param name="nodes" select="/list/func[(@leftStatus != $nul) and (@rightStatus != $nul) and ( (@leftStatus != @rightStatus) or (@leftVersion != @rightVersion) ) and not ( (@leftStatus = 'Draft') and (@rightStatus = 'Stable') and (@rightVersion = $rightVer) )]"/>
+ <xsl:with-param name="nodes" select="/list/func[(@leftStatus != $notFound) and (@rightStatus != $notFound) and ( (@leftStatus != @rightStatus) or (@leftVersion != @rightVersion) ) and not ( (@leftStatus = 'Draft') and (@rightStatus = 'Stable') and (@rightVersion = $rightVer) )]"/>
</xsl:call-template>
<P/><a href="#_top">(jump back to top)</a><hr/>
<xsl:with-param name="nodes" select="/list/func[@leftStatus != 'Stable' and @rightStatus = 'Stable']"/>
</xsl:call-template>
<P/><a href="#_top">(jump back to top)</a><hr/>
-
+
<a name="added"></a>
<h2>Added in <xsl:value-of select="$rightVer" /></h2>
<xsl:call-template name="genTable">
- <xsl:with-param name="nodes" select="/list/func[@leftStatus=$nul]"/>
+ <xsl:with-param name="nodes" select="/list/func[@leftStatus=$notFound]"/>
</xsl:call-template>
<P/><a href="#_top">(jump back to top)</a><hr/>
-
+
<a name="other"></a>
<h2>Other existing drafts in <xsl:value-of select="$rightVer" /></h2>
<div class='other'>
</ul>
</div>
<P/><a href="#_top">(jump back to top)</a><hr/>
-<!--
-
--->
+<!--
+
+-->
<p><i><font size="-1">Contents generated by StableAPI tool on <xsl:value-of select="$dateTime" /><br/>Copyright (C) <xsl:value-of select="$ourYear" />, International Business Machines Corporation, All Rights Reserved.</font></i></p>
</body>
</html>
</xsl:template>
+ <!-- almost all sutables are generated by this -->
<xsl:template name="genTable">
<xsl:param name="nodes" />
<table class='genTable' BORDER="1">
<xsl:for-each select="$nodes">
<xsl:sort select="@file" />
-
+<!--
+ <xsl:comment>
+ @prototype: <xsl:value-of select="@prototype" />
+ @leftStatus: <xsl:value-of select="@leftStatus" />
+ @leftVersion: <xsl:value-of select="@leftVersion" />
+ @rightStatus: <xsl:value-of select="@rightStatus" />
+ @rightVersion: <xsl:value-of select="@rightVersion" />
+ </xsl:comment>
+-->
<tr>
<xsl:attribute name="class">
<xsl:value-of select="'row'"/>
- <xsl:value-of select="(position() mod 2)"/>
- <!--
+ <xsl:value-of select="(position() mod 2)"/> <!-- for even-odd row colorings -->
+ <!--
<xsl:choose>
<xsl:when test="(position() mod 2) = 0"><xsl:value-of select="row0" /></xsl:when>
<xsl:otherwise><xsl:value-of select="row1" /></xsl:otherwise>
<xsl:attribute name="colspan">2</xsl:attribute>
<xsl:attribute name="align">center</xsl:attribute>
</xsl:if>
-
- <xsl:value-of select="@leftStatus" /><xsl:if test = "@leftStatus = 'Draft' and @rightStatus = 'Stable' and @leftVersion = @rightVersion">→Stable</xsl:if>
+
+ <xsl:value-of select="@leftStatus" />
+ <xsl:if test = "@leftStatus = 'Draft' and @rightStatus = 'Stable' and @leftVersion = @rightVersion">→Stable</xsl:if>
<xsl:if test="@leftVersion != '' and @leftVersion != '.'">
- <br/>
- <xsl:value-of select="@leftVersion" />
- </xsl:if>
+ <br/>
+ <xsl:value-of select="@leftVersion" />
+ </xsl:if>
+ <xsl:if test="@leftStatus = '' and @leftVersion = ''">
+ <i>(untagged)</i>
+ </xsl:if>
</td>
<xsl:if test = "@leftStatus != 'Draft' or @rightStatus != 'Stable' or @leftVersion != @rightVersion">
- <td> <xsl:value-of select="@rightStatus" />
- <br/>
+ <td> <xsl:value-of select="@rightStatus" />
+ <br/>
<span>
<xsl:attribute name="class">
<xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != '' and @rightVersion != '.'">
- <xsl:value-of select="'verchange'" />
+ <xsl:value-of select="'verchange'" />
</xsl:if>
- </xsl:attribute>
+ </xsl:attribute>
<xsl:if test="@rightVersion != '.'">
- <span>
+ <span>
<xsl:value-of select="@rightVersion" />
</span>
</xsl:if>
<xsl:if test ="@rightStatus = 'Draft' and @rightVersion != $rightVer">
<br/><b title='A draft API has the wrong version.' class='bigwarn'>(should be <xsl:value-of select="$rightVer"/>)</b>
</xsl:if>
- <xsl:if test="@leftStatus = 'None' and @rightVersion = '' and @rightStatus != 'Internal' and @rightStatus != 'Deprecated'">
+ <xsl:if test="@leftStatus = $notFound and @rightVersion = '' and @rightStatus != 'Internal' and @rightStatus != 'Deprecated'">
<br/><b title='A new API was introduced that was not tagged.' class='bigwarn'>(untagged)</b>
</xsl:if>
</span>
</xsl:for-each>
</table>
</xsl:template>
-
+
<xsl:template name="infoTable">
<xsl:param name="nodes" />
<table class='genTable' BORDER="1">
<xsl:for-each select="$nodes">
<xsl:sort select="@file" />
-
+
<tr>
<xsl:attribute name="class">
<xsl:value-of select="'row'"/>
<xsl:value-of select="(position() mod 2)"/>
- <!--
+ <!--
<xsl:choose>
<xsl:when test="(position() mod 2) = 0"><xsl:value-of select="row0" /></xsl:when>
<xsl:otherwise><xsl:value-of select="row1" /></xsl:otherwise>
<xsl:value-of select="'stabchange'" />
</xsl:if>
</xsl:attribute>
-
+
<xsl:if test = "@leftStatus = @rightStatus and @leftVersion = @rightVersion">
<xsl:attribute name="colspan">2</xsl:attribute>
<xsl:attribute name="align">center</xsl:attribute>
</xsl:if>
-
+
<xsl:value-of select="@leftStatus" />
<br/> <xsl:value-of select="@leftVersion" />
</td>
<xsl:if test = "@leftStatus != @rightStatus or @leftVersion != @rightVersion">
- <td> <xsl:value-of select="@rightStatus" />
- <br/>
+ <td> <xsl:value-of select="@rightStatus" />
+ <br/>
<span>
<xsl:attribute name="class">
<xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != '' and @rightVersion != '.'">
- <xsl:value-of select="'verchange'" />
+ <xsl:value-of select="'verchange'" />
</xsl:if>
- </xsl:attribute>
- <span>
+ </xsl:attribute>
+ <span>
<xsl:if test = "@rightVersion != '.'">
<xsl:value-of select="@rightVersion" />
</xsl:if>
</span>
- <!--
+ <!--
<xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != '' and @rightStatus = 'Stable'">
<br/><b title='A stable API changed version.' class='bigwarn'>(changed)</b>
</xsl:if>
<xsl:if test ="@rightStatus = 'Draft' and @rightVersion != $rightVer">
<br/><b title='A draft API has the wrong version.' class='bigwarn'>(should be <xsl:value-of select="$rightVer"/>)</b>
</xsl:if>
- <xsl:if test="@leftStatus = 'None' and @rightVersion = ''">
+ <xsl:if test="@leftStatus = $notFound and @rightVersion = ''">
<br/><b title='A new API was introduced that was not tagged.' class='bigwarn'>(untagged)</b>
</xsl:if>
-->
</xsl:for-each>
</table>
</xsl:template>
-
-
+
+
<xsl:template name="pureVirtualTable">
<xsl:param name="nodes" />
<table class='genTable' BORDER="1">
- <!--
+ <!--
<THEAD>
<tr>
<th> <xsl:value-of select="'File'" /> </th>
<xsl:for-each select="$nodes">
<xsl:sort select="@file" />
-
+
<tr>
<xsl:attribute name="class">
<xsl:value-of select="'row'"/>
<xsl:value-of select="(position() mod 2)"/>
- <!--
+ <!--
<xsl:choose>
<xsl:when test="(position() mod 2) = 0"><xsl:value-of select="row0" /></xsl:when>
<xsl:otherwise><xsl:value-of select="row1" /></xsl:otherwise>
<xsl:value-of select="'stabchange'" />
</xsl:if>
</xsl:attribute>
-
+
<xsl:if test = "@leftStatus = @rightStatus and @leftVersion = @rightVersion">
<xsl:attribute name="colspan">2</xsl:attribute>
<xsl:attribute name="align">center</xsl:attribute>
</xsl:if>
-
+
<xsl:value-of select="@leftStatus" />
<br/> <xsl:value-of select="@leftVersion" />
</td>
<xsl:if test = "@leftStatus != @rightStatus or @leftVersion != @rightVersion">
- <td> <xsl:value-of select="@rightStatus" />
- <br/>
+ <td> <xsl:value-of select="@rightStatus" />
+ <br/>
<span>
<xsl:attribute name="class">
<xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != ''">
- <xsl:value-of select="'verchange'" />
+ <xsl:value-of select="'verchange'" />
</xsl:if>
- </xsl:attribute>
- <span>
+ </xsl:attribute>
+ <span>
<xsl:value-of select="@rightVersion" />
</span>
- <!--
+ <!--
<xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != '' and @rightStatus = 'Stable'">
<br/><b title='A stable API changed version.' class='bigwarn'>(changed)</b>
</xsl:if>
<xsl:if test ="@rightStatus = 'Draft' and @rightVersion != $rightVer">
<br/><b title='A draft API has the wrong version.' class='bigwarn'>(should be <xsl:value-of select="$rightVer"/>)</b>
</xsl:if>
- <xsl:if test="@leftStatus = 'None' and @rightVersion = ''">
+ <xsl:if test="@leftStatus = $notFound and @rightVersion = ''">
<br/><b title='A new API was introduced that was not tagged.' class='bigwarn'>(untagged)</b>
</xsl:if>
-->
</xsl:for-each>
</table>
</xsl:template>
-
-</xsl:stylesheet>
-
-
-
+</xsl:stylesheet>