Added XML output to CVS Query processor.
1.1 --- a/javacvs/changelog/src/org/netbeans/modules/changelog/Bundle.properties Mon Jan 27 13:44:21 2003 +0000
1.2 +++ b/javacvs/changelog/src/org/netbeans/modules/changelog/Bundle.properties Mon Jan 27 20:45:15 2003 +0000
1.3 @@ -27,3 +27,4 @@
1.4 Templates/Services/ChangeLogHtmlType=ChangeLog HTML Server Info
1.5 Services/ChangeLogHtmlType=ChangeLog HTML Server Info
1.6 UI/Services/SourceCreationAndManagement/ChangeLogHtmlType=ChangeLog HTML Server Info
1.7 +
2.1 --- a/javacvs/changelog/src/org/netbeans/modules/changelog/ChangeLogProcessor.java Mon Jan 27 13:44:21 2003 +0000
2.2 +++ b/javacvs/changelog/src/org/netbeans/modules/changelog/ChangeLogProcessor.java Mon Jan 27 20:45:15 2003 +0000
2.3 @@ -86,6 +86,9 @@
2.4 /** Holds value of property toTextFile. */
2.5 private java.io.File toTextFile;
2.6
2.7 + /** Holds value of property toXmlFile. */
2.8 + private java.io.File toXmlFile;
2.9 +
2.10 /** Holds value of property toHtmlFile. */
2.11 private java.io.File toHtmlFile;
2.12
2.13 @@ -398,6 +401,21 @@
2.14 this.toTextFile = toTextFile;
2.15 }
2.16
2.17 + /** Getter for property toXmlFile.
2.18 + * @return Value of property toXmlFile.
2.19 + * Null means the xml file will not be written.
2.20 + */
2.21 + public java.io.File getToXmlFile() {
2.22 + return this.toXmlFile;
2.23 + }
2.24 +
2.25 + /** Setter for property toXmlFile.
2.26 + * @param toXmlFile New value of property toXmlFile.
2.27 + */
2.28 + public void setToXmlFile(java.io.File toXmlFile) {
2.29 + this.toXmlFile = toXmlFile;
2.30 + }
2.31 +
2.32 /** Getter for property toHtmlFile.
2.33 * @return Value of property toHtmlFile.
2.34 * Null means the html file will not be written.
2.35 @@ -449,6 +467,9 @@
2.36 if (getToTextFile() != null) {
2.37 printerList.add(new LogPrinter_Text(getToTextFile()));
2.38 }
2.39 + if (getToXmlFile() != null) {
2.40 + printerList.add(new LogPrinter_XML(getToXmlFile()));
2.41 + }
2.42 if (getToHtmlFile() != null || isViewInBrowser()) {
2.43 printerList.add(new LogPrinter_HTML(getToHtmlFile(), isViewInBrowser(), getHtmlSiteProcessor()));
2.44 }
2.45 @@ -465,7 +486,7 @@
2.46 Iterator it2 = list.iterator();
2.47 while (it2.hasNext()) {
2.48 LogInfoRevision rev = (LogInfoRevision)it2.next();
2.49 - if (fileMatchesFilterPattern(rev.getLogInfoHeader().getRepositoryFilename())) {
2.50 + if (fileMatchesFilterPattern(rev.getLogInfoHeader().getFile().toString())) {
2.51 ok = true;
2.52 break;
2.53 }
3.1 --- a/javacvs/changelog/src/org/netbeans/modules/changelog/ChangeLogUtils.java Mon Jan 27 13:44:21 2003 +0000
3.2 +++ b/javacvs/changelog/src/org/netbeans/modules/changelog/ChangeLogUtils.java Mon Jan 27 20:45:15 2003 +0000
3.3 @@ -104,4 +104,26 @@
3.4 return buffer.toString();
3.5 }
3.6
3.7 + private static final char[] xmlcharArray = new char[] {'>', '<', '&', '"', '\''};
3.8 + private static final String[] xmlstringArray =
3.9 + new String[] { ">", "<", "&", """, "'" };
3.10 +
3.11 + public static String xmlescapeString(String original) {
3.12 + StringBuffer buffer = new StringBuffer(original);
3.13 + int index = 0;
3.14 + while (index < buffer.length()) {
3.15 + char character = buffer.charAt(index);
3.16 + for (int i = 0; i < xmlcharArray.length; i++) {
3.17 + if (character == xmlcharArray[i]) {
3.18 + buffer.deleteCharAt(index);
3.19 + buffer.insert(index, xmlstringArray[i]);
3.20 + index = index + xmlstringArray[i].length();
3.21 + continue;
3.22 + }
3.23 + }
3.24 + index = index + 1;
3.25 + }
3.26 + return buffer.toString();
3.27 + }
3.28 +
3.29 }
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/javacvs/changelog/src/org/netbeans/modules/changelog/LogPrinter_XML.java Mon Jan 27 20:45:15 2003 +0000
4.3 @@ -0,0 +1,188 @@
4.4 +/*
4.5 + * Sun Public License Notice
4.6 + *
4.7 + * The contents of this file are subject to the Sun Public License
4.8 + * Version 1.0 (the "License"). You may not use this file except in
4.9 + * compliance with the License. A copy of the License is available at
4.10 + * http://www.sun.com/
4.11 + *
4.12 + * The Original Code is NetBeans. The Initial Developer of the Original
4.13 + * Code is Ralph Krueger.
4.14 + */
4.15 +
4.16 +package org.netbeans.modules.changelog;
4.17 +
4.18 +
4.19 +import java.util.*;
4.20 +import org.openide.windows.*;
4.21 +import org.openide.*;
4.22 +import java.io.*;
4.23 +import java.text.SimpleDateFormat;
4.24 +
4.25 +import org.netbeans.modules.changelog.html.*;
4.26 +
4.27 +/**
4.28 + * prints the processed groups to xml file.. (based on LogPrinter_Text)
4.29 + * @author rbalada
4.30 + * @author ralph
4.31 + */
4.32 +public class LogPrinter_XML implements LogPrinter {
4.33 +
4.34 + private java.io.PrintWriter writer;
4.35 + private boolean includeSummary;
4.36 +
4.37 + public LogPrinter_XML(File file) {
4.38 + if (!file.exists()) {
4.39 + try {
4.40 + if (file.getParentFile() != null) {
4.41 + file.getParentFile().mkdirs();
4.42 + }
4.43 + file.createNewFile();
4.44 + } catch (IOException exc) {
4.45 + org.openide.ErrorManager.getDefault().notify(exc);
4.46 + System.out.println("error while creating file..");
4.47 + }
4.48 + }
4.49 + writer = null;
4.50 + try {
4.51 + writer = new PrintWriter(new FileOutputStream(file));
4.52 + } catch (IOException exc) {
4.53 + org.openide.ErrorManager.getDefault().notify(exc);
4.54 + System.out.println("error while opening file..");
4.55 + }
4.56 + }
4.57 +
4.58 + public void printHeader(ChangeLogProcessor processor) {
4.59 + if (writer == null) {
4.60 + return;
4.61 + }
4.62 + writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
4.63 + writer.println();
4.64 + writer.println("<changelog>");
4.65 + includeSummary = processor.isIncludeSummary();
4.66 + if (processor.isIncludeQueryDescription()) {
4.67 + writer.println();
4.68 + writer.println("<query>");
4.69 + if (processor.getDateRange() != null) {
4.70 + writer.println("<daterange>" + ChangeLogUtils.xmlescapeString(processor.getDateRange()) + "</daterange>");
4.71 + }
4.72 + if (processor.getRevisionRange() != null) {
4.73 + writer.println("<revisionfilter>" + ChangeLogUtils.xmlescapeString(processor.getRevisionRange()) + "</revisionfilter>");
4.74 + }
4.75 + if (processor.getMessageFilter() != null) {
4.76 + String messageType = "";
4.77 + if (processor.getMessageFilterType() == ChangeLogProcessor.MESSAGE_FILTER_SUBSTRING) {
4.78 + messageType = "substring";
4.79 + } else if (processor.getMessageFilterType() == ChangeLogProcessor.MESSAGE_FILTER_SOME_WORDS) {
4.80 + messageType = "anywords";
4.81 + } else if (processor.getMessageFilterType() == ChangeLogProcessor.MESSAGE_FILTER_ALL_WORDS) {
4.82 + messageType = "allwords";
4.83 + } else if (processor.getMessageFilterType() == ChangeLogProcessor.MESSAGE_FILTER_REGEXP) {
4.84 + messageType = "regexp";
4.85 + }
4.86 + writer.println("<messagefilter messagetype=\"" + messageType + "\">" + ChangeLogUtils.xmlescapeString(processor.getMessageFilter()) + "</messagefilter>");
4.87 + }
4.88 + if (processor.getFileFilter() != null) {
4.89 + String fileType = "";
4.90 + if (processor.getFileFilterType() == ChangeLogProcessor.FILE_FILTER_SUBSTRING) {
4.91 + fileType = "substring";
4.92 + } else if (processor.getFileFilterType() == ChangeLogProcessor.FILE_FILTER_REGEXP) {
4.93 + fileType = "regexp";
4.94 + }
4.95 + writer.println("<filefilter filetype=\"" + fileType + "\">" + ChangeLogUtils.xmlescapeString(processor.getFileFilter()) + "</filefilter>");
4.96 + }
4.97 + if (processor.getSortMode() == ChangeLogProcessor.SORT_BY_DATE) {
4.98 + writer.print("<sort orderby=\"date\"");
4.99 + } else if (processor.getSortMode() == ChangeLogProcessor.SORT_BY_USER) {
4.100 + writer.print("<sort orderby=\"user\"");
4.101 + }
4.102 + if (processor.isDescendingSort()) {
4.103 + writer.println(" direction=\"descending\"/>");
4.104 + } else {
4.105 + writer.println(" direction=\"ascending\"/>");
4.106 + }
4.107 + writer.println("</query>");
4.108 + writer.println();
4.109 + }
4.110 + }
4.111 +
4.112 + public void printGroupHeader(RevisionsGroup group) {
4.113 + if (writer == null) {
4.114 + return;
4.115 + }
4.116 + writer.println("<entry>");
4.117 + writer.println("<author>" + ChangeLogUtils.xmlescapeString(group.getUser()) + "</author>");
4.118 + final String sdate = (new java.text.SimpleDateFormat("yyyy-MM-dd")).format(group.getStartingDate());
4.119 + final String stime = (new java.text.SimpleDateFormat("hh:mm:ss")).format(group.getStartingDate());
4.120 + writer.println("<date>" + ChangeLogUtils.xmlescapeString(sdate) + "</date>");
4.121 + writer.println("<time>" + ChangeLogUtils.xmlescapeString(stime) + "</time>");
4.122 + if ( group.getCommonBranch() != null) {
4.123 + writer.println("<commonbranch>" + ChangeLogUtils.xmlescapeString(group.getCommonBranch()) + "</commonbranch>");
4.124 + }
4.125 + writer.println("<msg>" + ChangeLogUtils.xmlescapeString(group.getMessage()).trim() + "</msg>");
4.126 + }
4.127 +
4.128 + public void printSingleRevision(LogInfoRevision revision) {
4.129 + if (writer == null ) {
4.130 + return;
4.131 + }
4.132 + String repoFileName = revision.getLogInfoHeader().getRepositoryFilename();
4.133 + repoFileName = repoFileName.substring(0, repoFileName.length() - 2);
4.134 + writer.println("<file>");
4.135 + writer.println("<name>" + ChangeLogUtils.xmlescapeString(repoFileName) + "</name>");
4.136 + writer.println("<revision>" + ChangeLogUtils.xmlescapeString(revision.getNumber()) + "</revision>");
4.137 + if ( revision.getBranch() != "" ) {
4.138 + writer.println("<branch>" + ChangeLogUtils.xmlescapeString(revision.getBranch()) + "</branch>");
4.139 + }
4.140 + writer.println("</file>");
4.141 + }
4.142 +
4.143 + public void printGroupFooter(RevisionsGroup group) {
4.144 + if (writer == null) {
4.145 + return;
4.146 + }
4.147 + writer.println("</entry>");
4.148 + writer.println();
4.149 + }
4.150 +
4.151 + public void printSummary(SummaryProcessor processor) {
4.152 + if (writer == null) {
4.153 + return;
4.154 + }
4.155 + if (includeSummary) {
4.156 + writer.println("<summary>");
4.157 + writer.println("<changecount>" + ChangeLogUtils.xmlescapeString(String.valueOf(processor.getCommitCount())) + "</changecount>");
4.158 + writer.println("<developers>");
4.159 + String[] users = processor.getUserList();
4.160 + for (int i = 0; i < users.length; i++) {
4.161 + writer.println("<developer>" + ChangeLogUtils.xmlescapeString(users[i]) + "</developer>");
4.162 + }
4.163 + writer.println("</developers>");
4.164 + String[] mostChanged = processor.getMostChangedFiles();
4.165 + writer.println("<mostchangedfiles>");
4.166 + for (int j = 0; j < mostChanged.length; j++) {
4.167 + writer.println("<mostchangedfile>" + ChangeLogUtils.xmlescapeString(mostChanged[j]) + "</mostchangedfile>");
4.168 + }
4.169 + writer.println("</mostchangedfiles>");
4.170 + writer.println("<mostactivedevelopers>");
4.171 + String[] mostActive= processor.getMostActiveUsers();
4.172 + for (int k = 0; k < mostActive.length; k++) {
4.173 + writer.println("<mostactivedeveloper>" + ChangeLogUtils.xmlescapeString(mostActive[k]) + "</mostactivedeveloper>");
4.174 + }
4.175 + writer.println("</mostactivedevelopers>");
4.176 + writer.println("</summary>");
4.177 + writer.println();
4.178 + }
4.179 + }
4.180 +
4.181 + public void printFooter(ChangeLogProcessor processor) {
4.182 + //do nothing
4.183 + if (writer != null) {
4.184 + writer.println("</changelog>");
4.185 + writer.println();
4.186 + writer.flush();
4.187 + writer.close();
4.188 + }
4.189 + }
4.190 +
4.191 +}
5.1 --- a/javacvs/changelog/src/org/netbeans/modules/changelog/wizard/Bundle.properties Mon Jan 27 13:44:21 2003 +0000
5.2 +++ b/javacvs/changelog/src/org/netbeans/modules/changelog/wizard/Bundle.properties Mon Jan 27 20:45:15 2003 +0000
5.3 @@ -22,8 +22,10 @@
5.4 OutputPanel.rbSortByDate.title=Date only
5.5 OutputPanel.btnTextFile.title=Select...
5.6 OutputPanel.btnHtmlFile.title=Select...
5.7 +OutputPanel.btnXmlFile.title=Select...
5.8 OutputPanel.cbWindow.title=View in HTML Browser
5.9 OutputPanel.cbHtmlFile.title=HTML File
5.10 +OutputPanel.cbXmlFile.title=HTML File
5.11 OutputPanel.cbTextFile.title=Plain Text File
5.12 OutputPanel.cbDescending.title=Descending
5.13 OutputPanel.cbOutputWindow.title=View in Output Window
6.1 --- a/javacvs/changelog/src/org/netbeans/modules/changelog/wizard/OutputPanel.form Mon Jan 27 13:44:21 2003 +0000
6.2 +++ b/javacvs/changelog/src/org/netbeans/modules/changelog/wizard/OutputPanel.form Mon Jan 27 20:45:15 2003 +0000
6.3 @@ -10,12 +10,17 @@
6.4 </Property>
6.5 </Properties>
6.6 <AuxValues>
6.7 - <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,103,0,0,2,115"/>
6.8 + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,123,0,0,2,115"/>
6.9 </AuxValues>
6.10
6.11 <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
6.12 <SubComponents>
6.13 <Container class="javax.swing.JPanel" name="pnlSort">
6.14 + <Properties>
6.15 + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
6.16 + <Dimension value="[553, 98]"/>
6.17 + </Property>
6.18 + </Properties>
6.19 <Constraints>
6.20 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.21 <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.5" weightY="0.5"/>
6.22 @@ -147,6 +152,12 @@
6.23 </SubComponents>
6.24 </Container>
6.25 <Container class="javax.swing.JPanel" name="pnlType">
6.26 + <Properties>
6.27 + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
6.28 + <Dimension value="[481, 124]"/>
6.29 + </Property>
6.30 + <Property name="autoscrolls" type="boolean" value="true"/>
6.31 + </Properties>
6.32 <Constraints>
6.33 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.34 <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="12" insetsBottom="12" insetsRight="12" anchor="17" weightX="0.5" weightY="0.1"/>
6.35 @@ -178,7 +189,7 @@
6.36 </Properties>
6.37 <Constraints>
6.38 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.39 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
6.40 + <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="6" anchor="17" weightX="0.0" weightY="0.0"/>
6.41 </Constraint>
6.42 </Constraints>
6.43 </Component>
6.44 @@ -194,6 +205,46 @@
6.45 </Constraint>
6.46 </Constraints>
6.47 </Component>
6.48 + <Component class="javax.swing.JCheckBox" name="cbXmlFile">
6.49 + <Properties>
6.50 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
6.51 + <ResourceString bundle="org/netbeans/modules/changelog/wizard/Bundle.properties" key="OutputPanel.cbHtmlFile.title" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString("{key}")"/>
6.52 + </Property>
6.53 + <Property name="label" type="java.lang.String" value="XML File"/>
6.54 + </Properties>
6.55 + <Constraints>
6.56 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.57 + <GridBagConstraints gridX="0" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="6" anchor="17" weightX="0.0" weightY="0.0"/>
6.58 + </Constraint>
6.59 + </Constraints>
6.60 + </Component>
6.61 + <Component class="javax.swing.JTextField" name="txXmlFile">
6.62 + <Properties>
6.63 + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
6.64 + <Dimension value="[200, 17]"/>
6.65 + </Property>
6.66 + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
6.67 + <Dimension value="[150, 17]"/>
6.68 + </Property>
6.69 + </Properties>
6.70 + <Constraints>
6.71 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.72 + <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="6" anchor="17" weightX="0.0" weightY="0.0"/>
6.73 + </Constraint>
6.74 + </Constraints>
6.75 + </Component>
6.76 + <Component class="javax.swing.JButton" name="btnXmlFile">
6.77 + <Properties>
6.78 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
6.79 + <ResourceString bundle="org/netbeans/modules/changelog/wizard/Bundle.properties" key="OutputPanel.btnHtmlFile.title" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString("{key}")"/>
6.80 + </Property>
6.81 + </Properties>
6.82 + <Constraints>
6.83 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.84 + <GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="6" anchor="17" weightX="0.0" weightY="0.0"/>
6.85 + </Constraint>
6.86 + </Constraints>
6.87 + </Component>
6.88 <Component class="javax.swing.JCheckBox" name="cbHtmlFile">
6.89 <Properties>
6.90 <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
6.91 @@ -202,7 +253,7 @@
6.92 </Properties>
6.93 <Constraints>
6.94 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.95 - <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="6" anchor="17" weightX="0.0" weightY="0.0"/>
6.96 + <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="6" anchor="17" weightX="0.0" weightY="0.0"/>
6.97 </Constraint>
6.98 </Constraints>
6.99 </Component>
6.100 @@ -217,7 +268,7 @@
6.101 </Properties>
6.102 <Constraints>
6.103 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.104 - <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
6.105 + <GridBagConstraints gridX="1" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
6.106 </Constraint>
6.107 </Constraints>
6.108 </Component>
6.109 @@ -229,7 +280,7 @@
6.110 </Properties>
6.111 <Constraints>
6.112 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.113 - <GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="6" anchor="17" weightX="0.0" weightY="0.0"/>
6.114 + <GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="0" insetsRight="6" anchor="17" weightX="0.0" weightY="0.0"/>
6.115 </Constraint>
6.116 </Constraints>
6.117 </Component>
6.118 @@ -241,7 +292,7 @@
6.119 </Properties>
6.120 <Constraints>
6.121 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
6.122 - <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="6" insetsRight="6" anchor="18" weightX="0.0" weightY="0.0"/>
6.123 + <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="6" insetsBottom="6" insetsRight="6" anchor="18" weightX="0.0" weightY="0.0"/>
6.124 </Constraint>
6.125 </Constraints>
6.126 </Component>
7.1 --- a/javacvs/changelog/src/org/netbeans/modules/changelog/wizard/OutputPanel.java Mon Jan 27 13:44:21 2003 +0000
7.2 +++ b/javacvs/changelog/src/org/netbeans/modules/changelog/wizard/OutputPanel.java Mon Jan 27 20:45:15 2003 +0000
7.3 @@ -39,6 +39,7 @@
7.4 ButtonGroup group2 = new ButtonGroup();
7.5 group2.add(rbAscending);
7.6 group2.add(rbDescending);
7.7 + btnXmlFile.setEnabled(false);// temporary
7.8 btnHtmlFile.setEnabled(false);// temporary
7.9 btnTextFile.setEnabled(false);// temporary
7.10 }
7.11 @@ -66,6 +67,9 @@
7.12 cbTextFile = new javax.swing.JCheckBox();
7.13 txTextFile = new javax.swing.JTextField();
7.14 btnTextFile = new javax.swing.JButton();
7.15 + cbXmlFile = new javax.swing.JCheckBox();
7.16 + txXmlFile = new javax.swing.JTextField();
7.17 + btnXmlFile = new javax.swing.JButton();
7.18 cbHtmlFile = new javax.swing.JCheckBox();
7.19 txHtmlFile = new javax.swing.JTextField();
7.20 btnHtmlFile = new javax.swing.JButton();
7.21 @@ -78,6 +82,7 @@
7.22 setMinimumSize(new java.awt.Dimension(400, 200));
7.23 pnlSort.setLayout(new java.awt.GridBagLayout());
7.24
7.25 + pnlSort.setMinimumSize(new java.awt.Dimension(553, 98));
7.26 lblSort.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("HtmlPanel.lblSort.text"));
7.27 gridBagConstraints = new java.awt.GridBagConstraints();
7.28 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.29 @@ -96,8 +101,8 @@
7.30 gridBagConstraints = new java.awt.GridBagConstraints();
7.31 gridBagConstraints.gridx = 0;
7.32 gridBagConstraints.gridy = 2;
7.33 + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
7.34 gridBagConstraints.insets = new java.awt.Insets(2, 6, 6, 6);
7.35 - gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
7.36 pnlSort.add(rbSortByUser, gridBagConstraints);
7.37
7.38 lblOrder.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("HtmlPanel.lblOrder.text"));
7.39 @@ -148,92 +153,119 @@
7.40 gridBagConstraints = new java.awt.GridBagConstraints();
7.41 gridBagConstraints.gridx = 2;
7.42 gridBagConstraints.gridy = 3;
7.43 - gridBagConstraints.insets = new java.awt.Insets(2, 12, 0, 6);
7.44 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
7.45 gridBagConstraints.weighty = 0.1;
7.46 + gridBagConstraints.insets = new java.awt.Insets(2, 12, 0, 6);
7.47 pnlSort.add(cbBranchNames, gridBagConstraints);
7.48
7.49 gridBagConstraints = new java.awt.GridBagConstraints();
7.50 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
7.51 + gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 12);
7.52 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
7.53 gridBagConstraints.weightx = 0.5;
7.54 gridBagConstraints.weighty = 0.5;
7.55 - gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 12);
7.56 add(pnlSort, gridBagConstraints);
7.57
7.58 pnlType.setLayout(new java.awt.GridBagLayout());
7.59
7.60 + pnlType.setMinimumSize(new java.awt.Dimension(481, 124));
7.61 + pnlType.setAutoscrolls(true);
7.62 cbTextFile.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("OutputPanel.cbTextFile.title"));
7.63 gridBagConstraints = new java.awt.GridBagConstraints();
7.64 gridBagConstraints.gridx = 0;
7.65 gridBagConstraints.gridy = 0;
7.66 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.67 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
7.68 - gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.69 pnlType.add(cbTextFile, gridBagConstraints);
7.70
7.71 txTextFile.setPreferredSize(new java.awt.Dimension(200, 17));
7.72 txTextFile.setMinimumSize(new java.awt.Dimension(150, 17));
7.73 gridBagConstraints = new java.awt.GridBagConstraints();
7.74 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.75 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.76 - gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 0);
7.77 pnlType.add(txTextFile, gridBagConstraints);
7.78
7.79 btnTextFile.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("OutputPanel.btnTextFile.title"));
7.80 gridBagConstraints = new java.awt.GridBagConstraints();
7.81 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.82 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.83 + pnlType.add(btnTextFile, gridBagConstraints);
7.84 +
7.85 + cbXmlFile.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("OutputPanel.cbHtmlFile.title"));
7.86 + cbXmlFile.setLabel("XML File");
7.87 + gridBagConstraints = new java.awt.GridBagConstraints();
7.88 + gridBagConstraints.gridx = 0;
7.89 gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.90 - pnlType.add(btnTextFile, gridBagConstraints);
7.91 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.92 + pnlType.add(cbXmlFile, gridBagConstraints);
7.93 +
7.94 + txXmlFile.setPreferredSize(new java.awt.Dimension(200, 17));
7.95 + txXmlFile.setMinimumSize(new java.awt.Dimension(150, 17));
7.96 + gridBagConstraints = new java.awt.GridBagConstraints();
7.97 + gridBagConstraints.gridx = 1;
7.98 + gridBagConstraints.gridy = 1;
7.99 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.100 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.101 + pnlType.add(txXmlFile, gridBagConstraints);
7.102 +
7.103 + btnXmlFile.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("OutputPanel.btnHtmlFile.title"));
7.104 + gridBagConstraints = new java.awt.GridBagConstraints();
7.105 + gridBagConstraints.gridx = 2;
7.106 + gridBagConstraints.gridy = 1;
7.107 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.108 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.109 + pnlType.add(btnXmlFile, gridBagConstraints);
7.110
7.111 cbHtmlFile.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("OutputPanel.cbHtmlFile.title"));
7.112 gridBagConstraints = new java.awt.GridBagConstraints();
7.113 gridBagConstraints.gridx = 0;
7.114 - gridBagConstraints.gridy = 1;
7.115 + gridBagConstraints.gridy = 2;
7.116 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.117 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.118 - gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.119 pnlType.add(cbHtmlFile, gridBagConstraints);
7.120
7.121 txHtmlFile.setPreferredSize(new java.awt.Dimension(200, 17));
7.122 txHtmlFile.setMinimumSize(new java.awt.Dimension(150, 17));
7.123 gridBagConstraints = new java.awt.GridBagConstraints();
7.124 gridBagConstraints.gridx = 1;
7.125 - gridBagConstraints.gridy = 1;
7.126 + gridBagConstraints.gridy = 2;
7.127 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 0);
7.128 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.129 - gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 0);
7.130 pnlType.add(txHtmlFile, gridBagConstraints);
7.131
7.132 btnHtmlFile.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("OutputPanel.btnHtmlFile.title"));
7.133 gridBagConstraints = new java.awt.GridBagConstraints();
7.134 gridBagConstraints.gridx = 2;
7.135 - gridBagConstraints.gridy = 1;
7.136 + gridBagConstraints.gridy = 2;
7.137 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.138 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.139 - gridBagConstraints.insets = new java.awt.Insets(6, 6, 0, 6);
7.140 pnlType.add(btnHtmlFile, gridBagConstraints);
7.141
7.142 cbWindow.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("OutputPanel.cbWindow.title"));
7.143 gridBagConstraints = new java.awt.GridBagConstraints();
7.144 gridBagConstraints.gridx = 0;
7.145 - gridBagConstraints.gridy = 2;
7.146 + gridBagConstraints.gridy = 4;
7.147 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 6, 6);
7.148 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
7.149 - gridBagConstraints.insets = new java.awt.Insets(6, 6, 6, 6);
7.150 pnlType.add(cbWindow, gridBagConstraints);
7.151
7.152 cbOutputWindow.setText(org.openide.util.NbBundle.getBundle(OutputPanel.class).getString("OutputPanel.cbOutputWindow.title"));
7.153 gridBagConstraints = new java.awt.GridBagConstraints();
7.154 gridBagConstraints.gridx = 0;
7.155 gridBagConstraints.gridy = 3;
7.156 + gridBagConstraints.insets = new java.awt.Insets(6, 6, 6, 6);
7.157 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
7.158 gridBagConstraints.weighty = 0.5;
7.159 - gridBagConstraints.insets = new java.awt.Insets(6, 6, 6, 6);
7.160 pnlType.add(cbOutputWindow, gridBagConstraints);
7.161
7.162 gridBagConstraints = new java.awt.GridBagConstraints();
7.163 gridBagConstraints.gridx = 0;
7.164 gridBagConstraints.gridy = 1;
7.165 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
7.166 + gridBagConstraints.insets = new java.awt.Insets(0, 12, 12, 12);
7.167 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
7.168 gridBagConstraints.weightx = 0.5;
7.169 gridBagConstraints.weighty = 0.1;
7.170 - gridBagConstraints.insets = new java.awt.Insets(0, 12, 12, 12);
7.171 add(pnlType, gridBagConstraints);
7.172
7.173 }//GEN-END:initComponents
7.174 @@ -284,6 +316,13 @@
7.175 cbHtmlFile.setSelected(false);
7.176 txHtmlFile.setText("");
7.177 }
7.178 + if (proces.getToXmlFile() != null) {
7.179 + txXmlFile.setText(proces.getToXmlFile().getAbsolutePath());
7.180 + cbXmlFile.setSelected(true);
7.181 + } else {
7.182 + cbXmlFile.setSelected(false);
7.183 + txXmlFile.setText("");
7.184 + }
7.185 cbOutputWindow.setSelected(proces.isToOutputWindow());
7.186 cbWindow.setSelected(proces.isViewInBrowser());
7.187 if (proces.getSortMode() == ChangeLogProcessor.SORT_BY_USER) {
7.188 @@ -327,6 +366,11 @@
7.189 } else {
7.190 proces.setToTextFile(null);
7.191 }
7.192 + if (cbXmlFile.isSelected() && txXmlFile.getText().length() > 0) {
7.193 + proces.setToXmlFile(new File(txXmlFile.getText()));
7.194 + } else {
7.195 + proces.setToXmlFile(null);
7.196 + }
7.197 if (cbHtmlFile.isSelected() && txHtmlFile.getText().length() > 0) {
7.198 proces.setToHtmlFile(new File(txHtmlFile.getText()));
7.199 } else {
7.200 @@ -351,9 +395,11 @@
7.201 }
7.202
7.203 // Variables declaration - do not modify//GEN-BEGIN:variables
7.204 + private javax.swing.JTextField txXmlFile;
7.205 private javax.swing.JRadioButton rbSortByUser;
7.206 private javax.swing.JPanel pnlType;
7.207 private javax.swing.JRadioButton rbDescending;
7.208 + private javax.swing.JCheckBox cbXmlFile;
7.209 private javax.swing.JLabel lblInclude;
7.210 private javax.swing.JCheckBox cbHtmlFile;
7.211 private javax.swing.JCheckBox cbBranchNames;
7.212 @@ -361,6 +407,7 @@
7.213 private javax.swing.JCheckBox cbSummary;
7.214 private javax.swing.JCheckBox cbOutputWindow;
7.215 private javax.swing.JCheckBox cbTextFile;
7.216 + private javax.swing.JButton btnXmlFile;
7.217 private javax.swing.JButton btnHtmlFile;
7.218 private javax.swing.JTextField txHtmlFile;
7.219 private javax.swing.JPanel pnlSort;
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/javacvs/changelog/src/org/netbeans/modules/changelog/xml/changelog.dtd Mon Jan 27 20:45:15 2003 +0000
8.3 @@ -0,0 +1,53 @@
8.4 +<?xml version="1.0" encoding="UTF-8"?>
8.5 +<!--
8.6 + Sun Public License Notice
8.7 +
8.8 +The contents of this file are subject to the Sun Public License
8.9 +Version 1.0 (the "License"). You may not use this file except in
8.10 +compliance with the License. A copy of the License is available at
8.11 +http://www.sun.com/
8.12 +
8.13 +The Original Code is NetBeans. The Initial Developer of the Original
8.14 +Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
8.15 +Microsystems, Inc. All Rights Reserved.
8.16 +-->
8.17 +<!--
8.18 +Todo: attribute values are known, update to allowed attribute values only
8.19 +-->
8.20 +
8.21 +<!ELEMENT author (#PCDATA)>
8.22 +<!ELEMENT branch (#PCDATA)>
8.23 +<!ELEMENT commonbranch (#PCDATA)>
8.24 +<!ELEMENT changelog (query*,entry*,summary*)>
8.25 +<!ELEMENT query (daterange?, revisionfilter?, messagefilter?, filefilter?, sort)>
8.26 +<!ELEMENT entry (author, date, time, commonbranch?, msg, file+)>
8.27 +<!ELEMENT summary (changecount, developers+, mostchangedfiles+, mostactivedevelopers+)>
8.28 +<!ELEMENT changecount (#PCDATA)>
8.29 +<!ELEMENT developers (developer*)>
8.30 +<!ELEMENT developer (#PCDATA)>
8.31 +<!ELEMENT mostactivedevelopers (mostactivedeveloper*)>
8.32 +<!ELEMENT mostactivedeveloper (#PCDATA)>
8.33 +<!ELEMENT mostchangedfiles (mostchangedfile*)>
8.34 +<!ELEMENT mostchangedfile (#PCDATA)>
8.35 +
8.36 +<!ELEMENT date (#PCDATA)>
8.37 +<!ELEMENT daterange (#PCDATA)>
8.38 +<!ELEMENT file (name, revision, branch?)>
8.39 +<!ELEMENT msg (#PCDATA)>
8.40 +<!ELEMENT name (#PCDATA)>
8.41 +<!ELEMENT revision (#PCDATA)>
8.42 +<!ELEMENT revisionfilter (#PCDATA)>
8.43 +<!ELEMENT messagefilter (#PCDATA)>
8.44 +<!ATTLIST messagefilter
8.45 + messagetype CDATA ""
8.46 +>
8.47 +<!ELEMENT filefilter (#PCDATA)>
8.48 +<!ATTLIST filefilter
8.49 + filetype CDATA ""
8.50 +>
8.51 +<!ELEMENT sort (#PCDATA)>
8.52 +<!ATTLIST sort
8.53 + orderby CDATA ""
8.54 + direction CDATA ""
8.55 +>
8.56 +<!ELEMENT time (#PCDATA)>
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/javacvs/changelog/src/org/netbeans/modules/changelog/xml/xml2html_sample.xsl Mon Jan 27 20:45:15 2003 +0000
9.3 @@ -0,0 +1,279 @@
9.4 +<?xml version="1.0" encoding="ASCII" ?>
9.5 +
9.6 +<!--
9.7 + Sun Public License Notice
9.8 +
9.9 +The contents of this file are subject to the Sun Public License
9.10 +Version 1.0 (the "License"). You may not use this file except in
9.11 +compliance with the License. A copy of the License is available at
9.12 +http://www.sun.com/
9.13 +
9.14 +The Original Code is NetBeans. The Initial Developer of the Original
9.15 +Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
9.16 +Microsystems, Inc. All Rights Reserved.
9.17 +-->
9.18 +
9.19 +<!--
9.20 + this is a sample stylesheet for xml->html output of NetBeans changelog module
9.21 + Original author: Rudolf Balada <Rudolf.Balada@sun.com> (C) 2003 Sun Microsystems, Inc.
9.22 + Note: this is my very first xsl
9.23 +-->
9.24 +
9.25 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xlink="http://www.w3c.org/1999/xlink">
9.26 +
9.27 +<xsl:output method="html"
9.28 + indent="yes"
9.29 +/>
9.30 +
9.31 +
9.32 +<!-- root element -->
9.33 +<xsl:template match="/">
9.34 +<html>
9.35 +<head>
9.36 +<title>Changelog</title>
9.37 +</head>
9.38 +
9.39 +<xsl:choose>
9.40 + <xsl:when test='count(changelog/entry) > 0'> <!-- there are entries -->
9.41 + <xsl:apply-templates select="changelog"/>
9.42 + </xsl:when>
9.43 + <xsl:otherwise> <!-- no changes -->
9.44 + <body link="#000000" alink="#000000" vlink="#000000" text="#000000">
9.45 +<STYLE TYPE="text/css"><xsl:text><!--
9.46 +A:link { color:#000000 }
9.47 +A:active {color:#000000 }
9.48 +A:visited { color: #000000}
9.49 +H1 { font-family: arial,helvetica,sans-serif; font-size: 18pt; font-weight: bold;}
9.50 +H2 { font-family: arial,helvetica,sans-serif; font-size: 14pt; font-weight: bold;}
9.51 +BODY,TD { font-family: arial,helvetica,sans-serif; font-size: 10pt; }
9.52 +TH { font-family: arial,helvetica,sans-serif; font-size: 11pt; font-weight: bold; }
9.53 +//--></xsl:text></STYLE>
9.54 +<h1>Changelog</h1>
9.55 + <TABLE BORDER="0" WIDTH="800" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000">
9.56 + <TR>
9.57 + <TD bgcolor="#000000">
9.58 + <TABLE BORDER="0" WIDTH="100%" CELLPADDING="3" CELLSPACING="1" BGCOLOR="#000000">
9.59 + <TR><TD align="center" valign="middle" bgcolor="#ffffff"><B>No changes</B></TD></TR>
9.60 + </TABLE>
9.61 + </TD>
9.62 + </TR>
9.63 + </TABLE>
9.64 + </body>
9.65 + </xsl:otherwise>
9.66 +</xsl:choose>
9.67 +</html>
9.68 +</xsl:template>
9.69 +
9.70 +<!-- changelog -->
9.71 +<xsl:template match="changelog">
9.72 + <body link="#000000" alink="#000000" vlink="#000000" text="#000000">
9.73 +<STYLE TYPE="text/css"><xsl:text><!--
9.74 +A:link { color:#000000 }
9.75 +A:active {color:#000000 }
9.76 +A:visited { color: #000000}
9.77 +H1 { font-family: arial,helvetica,sans-serif; font-size: 18pt; font-weight: bold;}
9.78 +H2 { font-family: arial,helvetica,sans-serif; font-size: 14pt; font-weight: bold;}
9.79 +BODY,TD { font-family: arial,helvetica,sans-serif; font-size: 10pt; }
9.80 +TH { font-family: arial,helvetica,sans-serif; font-size: 11pt; font-weight: bold; }
9.81 +//--></xsl:text></STYLE>
9.82 +<h1>Changelog</h1>
9.83 + <xsl:apply-templates select='query'/>
9.84 + <TABLE BORDER="0" WIDTH="800" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000">
9.85 + <TR>
9.86 + <TD bgcolor="#000000">
9.87 + <TABLE BORDER="0" WIDTH="100%" CELLPADDING="3" CELLSPACING="1" BGCOLOR="#000000">
9.88 + <xsl:apply-templates select="entry"/>
9.89 + </TABLE>
9.90 + </TD>
9.91 + </TR>
9.92 + </TABLE>
9.93 + <xsl:apply-templates select='summary'/>
9.94 + </body>
9.95 +</xsl:template>
9.96 +
9.97 +<!-- entry -->
9.98 +<xsl:template match="entry">
9.99 + <TR>
9.100 + <TD colspan="2" bgcolor="#9999CC">
9.101 + <TABLE width="100%" cellpadding="0" cellspacing="0" border="0">
9.102 + <TR>
9.103 + <TD><xsl:apply-templates select="date"/>
9.104 + <xsl:text> </xsl:text>
9.105 + <xsl:apply-templates select="time"/>
9.106 + <xsl:text> </xsl:text>
9.107 + <xsl:apply-templates select="author"/>
9.108 + </TD>
9.109 + <TD align="right"><xsl:text disable-output-escaping="yes"><![CDATA[ ]]></xsl:text>
9.110 + </TD>
9.111 + </TR>
9.112 + </TABLE>
9.113 + </TD>
9.114 + </TR>
9.115 + <TR>
9.116 + <TD width="20" rowspan="2" bgcolor="#CCCCFF"><xsl:text disable-output-escaping="yes"><![CDATA[ ]]></xsl:text></TD>
9.117 + <TD bgcolor="#CCCCCC"><b><xsl:apply-templates select="msg"/></b></TD>
9.118 + </TR>
9.119 + <TR>
9.120 + <TD bgcolor="#EEEEEE">
9.121 + <xsl:apply-templates select="file"/>
9.122 + </TD>
9.123 + </TR>
9.124 + <TR>
9.125 + <TD colspan="2" bgcolor="#ffffff"><xsl:text disable-output-escaping="yes"><![CDATA[ ]]></xsl:text></TD>
9.126 + </TR>
9.127 +</xsl:template>
9.128 +
9.129 +
9.130 +<!-- changelog/query -->
9.131 +<xsl:template match="changelog/query">
9.132 +<xsl:if test='string-length(daterange/text()) > 0'>
9.133 + <xsl:text>Date range: </xsl:text><xsl:value-of select='daterange/text()'/><BR/>
9.134 +</xsl:if>
9.135 +<xsl:if test='string-length(revisionfilter/text()) > 0'>
9.136 + <xsl:text>Revision filter: </xsl:text><xsl:value-of select='revisionfilter/text()'/><BR/>
9.137 +</xsl:if>
9.138 +<xsl:if test='string-length(messagefilter/text()) > 0'>
9.139 + <xsl:text>Message filter: type:</xsl:text><xsl:value-of select='messagefilter/@messagetype'/><xsl:text> string: </xsl:text><xsl:value-of select='messagefilter/text()'/><BR/>
9.140 +</xsl:if>
9.141 +<xsl:if test='string-length(filefilter/text()) > 0'>
9.142 + <xsl:text>File filter: type:</xsl:text><xsl:value-of select='messagefilter/@filetype'/><xsl:text> string: </xsl:text><xsl:value-of select='filefilter/text()'/><BR/>
9.143 +</xsl:if>
9.144 +<xsl:if test='string-length(sort/@orderby) > 0'>
9.145 + <xsl:text>Sort order by: </xsl:text><xsl:value-of select='sort/@orderby'/><xsl:text> </xsl:text><xsl:value-of select='sort/@direction'/><BR/>
9.146 +</xsl:if>
9.147 +</xsl:template>
9.148 +<!-- -->
9.149 +
9.150 +<!-- changelog/summary -->
9.151 +<xsl:template match="changelog/summary">
9.152 +<xsl:if test='string-length(changecount/text()) > 0'>
9.153 + <xsl:text>Number of changes: </xsl:text><xsl:value-of select='changecount/text()'/><BR/>
9.154 +</xsl:if>
9.155 +<xsl:if test='count(developers/developer) > 0'>
9.156 + <xsl:text>Developers: </xsl:text><BR/>
9.157 + <blockquote>
9.158 + <xsl:apply-templates select="developers/developer"/>
9.159 + </blockquote>
9.160 +</xsl:if>
9.161 +<xsl:if test='count(mostchangedfiles/mostchangedfile) > 0'>
9.162 + <xsl:text>Most changed files: </xsl:text><BR/>
9.163 + <blockquote>
9.164 + <xsl:apply-templates select="mostchangedfiles/mostchangedfile"/>
9.165 + </blockquote>
9.166 +</xsl:if>
9.167 +<xsl:if test='count(mostactivedevelopers/mostactivedeveloper) > 0'>
9.168 + <xsl:text>Most active developers: </xsl:text><BR/>
9.169 + <blockquote>
9.170 + <xsl:apply-templates select="mostactivedevelopers/mostactivedeveloper"/>
9.171 + </blockquote>
9.172 +</xsl:if>
9.173 +</xsl:template>
9.174 +
9.175 +<!-- changelog/summary/developers/developer -->
9.176 +<xsl:template match="changelog/summary/developers/developer">
9.177 + <xsl:value-of select='text()'/><BR/>
9.178 +</xsl:template>
9.179 +
9.180 +<!-- changelog/summary/mostchangedfiles/mostchangedfile -->
9.181 +<xsl:template match="changelog/summary/mostchangedfiles/mostchangedfile">
9.182 + <xsl:value-of select='text()'/><BR/>
9.183 +</xsl:template>
9.184 +
9.185 +<!-- changelog/summary/mostactivedevelopers/mostactivedeveloper -->
9.186 +<xsl:template match="changelog/summary/mostactivedevelopers/mostactivedeveloper">
9.187 + <xsl:value-of select='text()'/><BR/>
9.188 +</xsl:template>
9.189 +
9.190 +<!-- changelog/entry/file -->
9.191 +<xsl:template match="changelog/entry/file">
9.192 +<xsl:call-template name="makeReference">
9.193 + <xsl:with-param name="href">
9.194 + <xsl:text disable-output-escaping="yes">http://www.netbeans.org/source/browse/</xsl:text>
9.195 + <xsl:value-of select='substring-after(current()/name/text(), "/cvs/")'/>
9.196 + </xsl:with-param>
9.197 + <xsl:with-param name="title"><xsl:value-of select='substring-after(current()/name/text(), "/cvs/")'/>
9.198 + </xsl:with-param>
9.199 +</xsl:call-template><xsl:text>:</xsl:text>
9.200 +<xsl:text> (</xsl:text>
9.201 +<xsl:call-template name="makeReference">
9.202 + <xsl:with-param name="href">
9.203 + <xsl:text disable-output-escaping="yes">http://www.netbeans.org/source/browse/</xsl:text>
9.204 + <xsl:value-of select='substring-after(current()/name/text(), "/cvs/")'/><xsl:text>?rev=</xsl:text><xsl:value-of select="current()/revision/text()"/><xsl:text>&content-type=text/x-cvsweb-markup</xsl:text>
9.205 + </xsl:with-param>
9.206 + <xsl:with-param name="title"><xsl:value-of select="current()/revision/text()"/>
9.207 + </xsl:with-param>
9.208 +</xsl:call-template><xsl:text>)</xsl:text>
9.209 +<xsl:if test="not (position()=last())"><BR/></xsl:if><xsl:text>
9.210 +</xsl:text>
9.211 +</xsl:template>
9.212 +
9.213 +<!-- changelog/entry/file/name -->
9.214 +<xsl:template match="changelog/entry/file/name">
9.215 +<xsl:value-of select="text()"/>
9.216 +</xsl:template>
9.217 +
9.218 +<!-- changelog/entry/file/branch -->
9.219 +<xsl:template match="changelog/entry/file/branch">
9.220 +<xsl:value-of select="text()"/>
9.221 +</xsl:template>
9.222 +
9.223 +<!-- changelog/entry/file/revision -->
9.224 +<xsl:template match="changelog/entry/file/revision">
9.225 +<xsl:value-of select="text()"/>
9.226 +</xsl:template>
9.227 +
9.228 +<!-- changelog/entry/author -->
9.229 +<xsl:template match="changelog/entry/author">
9.230 +<B>
9.231 +<xsl:call-template name="makeReference">
9.232 + <xsl:with-param name="href">
9.233 + <xsl:text disable-output-escaping="yes">mailto:</xsl:text>
9.234 + <xsl:value-of select="text()"/><xsl:text>@netbeans.org</xsl:text>
9.235 + </xsl:with-param>
9.236 + <xsl:with-param name="title"><xsl:value-of select="text()"/>
9.237 + </xsl:with-param>
9.238 +</xsl:call-template></B>
9.239 +</xsl:template>
9.240 +
9.241 +<!-- changelog/entry/date -->
9.242 +<xsl:template match="changelog/entry/date">
9.243 +<B><xsl:value-of select="text()"/></B>
9.244 +</xsl:template>
9.245 +
9.246 +<!-- changelog/entry/time -->
9.247 +<xsl:template match="changelog/entry/time">
9.248 +<B><xsl:value-of select="text()"/></B>
9.249 +</xsl:template>
9.250 +
9.251 +<!-- changelog/entry/msg -->
9.252 +<!-- what about text wrapping ? -->
9.253 +<xsl:template match="changelog/entry/msg">
9.254 +<xsl:value-of select="text()"/>
9.255 +</xsl:template>
9.256 +
9.257 +<!--
9.258 + NAMED TEMPLATES
9.259 + -->
9.260 +<!-- makeLink -->
9.261 +<xsl:template name="makeLink">
9.262 +<xsl:param name="name" select="''"/>
9.263 +<xsl:param name="title" select="''"/>
9.264 +<xsl:text disable-output-escaping="yes"><A name="</xsl:text>
9.265 +<xsl:value-of select="$name"/>
9.266 +<xsl:text disable-output-escaping="yes">"></xsl:text>
9.267 +<xsl:value-of select="$title"/>
9.268 +<xsl:text disable-output-escaping="yes"></A></xsl:text>
9.269 +</xsl:template>
9.270 +
9.271 +<!-- makeReference -->
9.272 +<xsl:template name="makeReference">
9.273 +<xsl:param name="href" select="''"/>
9.274 +<xsl:param name="title" select="''"/>
9.275 +<xsl:text disable-output-escaping="yes"><A href="</xsl:text>
9.276 +<xsl:value-of select="$href"/>
9.277 +<xsl:text disable-output-escaping="yes">"></xsl:text>
9.278 +<xsl:value-of select="$title"/>
9.279 +<xsl:text disable-output-escaping="yes"></A></xsl:text>
9.280 +</xsl:template>
9.281 +
9.282 +</xsl:stylesheet>