Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble rebasing, need to reconcile manually #131

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Auto detect text files and perform LF normalization
* text=auto

# Below types are listed explicitly just in case to avoid unexpected mistakes in git auto above
*.java text
*.html text
*.xml text
*.xsl text
*.css text
*.js text

# Note: executable is a non-standard attribute, and it is helpful for the release plugin
*.sh text eol=lf executable
*.cgi text eol=lf executable

# Windows expects CRLF always
*.bat text eol=crlf
*.cmd text eol=crlf
68 changes: 68 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

permissions:
contents: read

# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners
# GitHub Actions does not support Docker, PostgreSQL server on Windows, macOS :(

concurrency:
# On master/release, we don't want any jobs cancelled so the sha is used to name the group
# On PR branches, we cancel the job if new commits are pushed
# More info: https://stackoverflow.com/a/68422069/253468
group: ${{ github.ref == 'refs/heads/trunk' && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }}
cancel-in-progress: true

jobs:
build:
name: 'Java 8'
runs-on: ubuntu-latest
steps:
- name: 'Checkout xalan-java'
uses: actions/checkout@v3
- name: 'Set up JDK 8'
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 8
- name: 'Build Xalan jars'
run: |
ant jar
- uses: actions/checkout@v3
name: 'Checkout xalan-test'
with:
repository: apache/xalan-test
path: xalan-test
ref: master
- name: 'Run xalan-test tests'
working-directory: xalan-test
# NOTE: "alltest" target includes conformance tests known not to run in Xalan,
# as well as having dependencies on some targets which have since been edited
# out. The following is our typical minimal build test as documented in README,
# minus conf.xsltc since that one is currently throwing four known failures and
# isn't set up to say "but that's not a regression".
run: |
ant jar extensions.classes smoketest apitest -Dxalan.relpath=../ -Dparserjar=../lib/endorsed/xercesImpl.jar -Dxml-apis.jar=../lib/endorsed/xml-apis.jar

# ant fulldist is failing: in CI
# /home/runner/work/xalan-java/xalan-java/build.xml:1399: /home/runner/work/xalan-java/xalan-test does not exist.
# Error replicated on my system if there is not a sibling xalan-test.
# NOT replicated if sibling xalan-test directory is present
# Simplest fix would be to have the above test checkout emulate the dev environment;
# better would be to fix fulldist to intelligently check both locations;
# best might be to adopt xalan-test back into the xalan repository, if it's no longer being used elsewhere.
- name: 'Cheat xalan-test up to be sibling of xalan-java'
run: |
mv xalan-test ..; ls ..
- id: build_artifacts
run: |
ant fulldist

36 changes: 35 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
/bin/
/build/
/build/
/classes/
/.idea/
*.iml
.DS_Store

# We download the dependencies if they are missing
/lib/
/tools/java_cup.jar
/tmp/

# Generated sources
/src/org/apache/xalan/processor/XSLProcessorVersion.java
/src/org/apache/xalan/xsltc/compiler/XPathLexer.java
/src/org/apache/xalan/xsltc/compiler/XPathParser.java
/src/org/apache/xalan/xsltc/compiler/sym.java
/xdocs/sources/xalan/DONE
/xdocs/sources/xalan/XSLTCDONE

# The following are unpacked from zipfile
# NOTE: Might be simpler to just check 'em in unzipped.
/xdocs/style/graphics/
/xdocs/style/loader.xml
/xdocs/style/resources/
/xdocs/style/stylesheets/any2header.xsl
/xdocs/style/stylesheets/any2project.xsl
/xdocs/style/stylesheets/book2group.xsl
/xdocs/style/stylesheets/book2project.xsl
/xdocs/style/stylesheets/changes2document.xsl
/xdocs/style/stylesheets/context2footer.xsl
/xdocs/style/stylesheets/context2label.xsl
/xdocs/style/stylesheets/directory2project.xsl
/xdocs/style/stylesheets/document2html.xsl
/xdocs/style/stylesheets/faqs2document.xsl
/xdocs/style/stylesheets/group2document.xsl
2 changes: 1 addition & 1 deletion samples/CompiledApplet/README.applet
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ try removing the reference to an external DTD in your XML source.

java.lang.IllegalAccessError - Sun JRE 1.4.* has bundled with it an old version
of Xalan-J Interpretive (2.2.D11).
Copy a new verison of xalan.jar to the %Java_JRE%/lib/endorsed/ directory.
Copy a new version of xalan.jar to the %Java_JRE%/lib/endorsed/ directory.
----------------------------------------------------------------------
END OF README
2 changes: 1 addition & 1 deletion samples/TransformThread/TransformThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public TransformThread(int thrdNum)
StreamSource xslSource = new StreamSource(xslSourceFileName);
xslSource.setSystemId(xslSourceURI);

// Initialize the tranformer
// Initialize the transformer
m_transformer =
TransformerFactory.newInstance().newTransformer(xslSource);
m_thread = new Thread(this);
Expand Down
2 changes: 1 addition & 1 deletion samples/Validate/ValidateXMLInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void validate()
}
catch (TransformerException te)
{
// The TransformerException wraps someting other than a SAXParseException
// The TransformerException wraps something other than a SAXParseException
// warning or error, either of which should be "caught" by the Handler.
System.out.println("Not a SAXParseException warning or error: " + te.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void main(String[] args)
// org.apache.xalan.transformer.TransformerImpl.
TransformerFactory tFactory = TransformerFactory.newInstance();

// Grab the Name of the Stylesheet from the commad line
// Grab the Name of the Stylesheet from the command line
if (args.length == 0)
{
System.out.println("You must provide the path and name to a stylesheet to process");
Expand Down
2 changes: 1 addition & 1 deletion samples/extensions/sql/runExtConnection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi
#argument when running under JDK 1.4 this should also work for JDK 1.5

#The XML Apis are going to be either in the LIB dir for a source
#release or in the root direcctory for a binary release.
#release or in the root directory for a binary release.


if [ -f ../../../build/xalan.jar ] ; then
Expand Down
2 changes: 1 addition & 1 deletion samples/extensions/sql/runXalan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi
#argument when running under JDK 1.4 this should also work for JDK 1.5

#The XML Apis are going to be either in the LIB dir for a source
#release or in the root direcctory for a binary release.
#release or in the root directory for a binary release.


if [ -f ../../../build/xalan.jar ] ; then
Expand Down
2 changes: 1 addition & 1 deletion samples/servlet/default.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
}
e = e.parentElement;

// call the correct funtion to change the collapse/expand state and display
// call the correct function to change the collapse/expand state and display
if (e.className == "e")
ch(e);
if (e.className == "k")
Expand Down
2 changes: 1 addition & 1 deletion samples/servlet/jspSample.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This JSP uses PMA to set param1 in the
* foo.xsl stylesheet before using the
* stylesheet to transform foo.xml
* and outputing the result.
* and outputting the result.
*
* Invoke the jsp from the appropriate
* context for your servlet/jsp server.
Expand Down
2 changes: 1 addition & 1 deletion src/org/apache/xalan/templates/ElemExsltFuncResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ElemExsltFuncResult extends ElemVariable
static final long serialVersionUID = -3478311949388304563L;
/*
* To keep the binary compatibility put those three private global
* variables back, although they are never used in this verison
* variables back, although they are never used in this version
*/
// A flag indicating whether the return result is set
private boolean m_isResultSet = false;
Expand Down
4 changes: 2 additions & 2 deletions src/org/apache/xalan/transformer/TransformerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public class TransformerImpl extends Transformer
*/
private boolean m_isTransformDone = false;

/** Flag to to tell if the tranformer needs to be reset. */
/** Flag to tell if the transformer needs to be reset. */
private boolean m_hasBeenReset = false;

/** NEEDSDOC Field m_shouldReset */
Expand Down Expand Up @@ -2262,7 +2262,7 @@ public boolean applyTemplateToNode(ElemTemplateElement xslInstruction, // xsl:a
// since much (most? all?) of the processing has been inlined.
// (It would be nice if there was a single entry point that
// worked for both... but the interpretive system works by
// having the Tranformer execute the children, while the
// having the Transformer execute the children, while the
// compiled obviously has to run its own code. It's
// also unclear that "execute" is really the right name for
// that entry point.)
Expand Down
2 changes: 1 addition & 1 deletion src/org/apache/xalan/xsltc/trax/DOM2SAX.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private static String getLocalName(Node node) {
}

public void parse(InputSource unused) throws IOException, SAXException {
parse(_dom);
parse();
}

public void parse() throws IOException, SAXException {
Expand Down
2 changes: 1 addition & 1 deletion src/org/apache/xalan/xsltc/trax/TemplatesImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public TemplatesImpl() { }

/**
* Overrides the default readObject implementation since we decided
* it would be cleaner not to serialize the entire tranformer
* it would be cleaner not to serialize the entire transformer
* factory. [ ref bugzilla 12317 ]
* We need to check if the user defined class for URIResolver also
* implemented Serializable
Expand Down
11 changes: 8 additions & 3 deletions src/org/apache/xml/utils/XMLReaderManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,15 @@ public synchronized XMLReader getXMLReader() throws SAXException {
* @param reader The XMLReader that's being released.
*/
public synchronized void releaseXMLReader(XMLReader reader) {
if (reader == null) {
return;
}
// If the reader that's being released is the cached reader
// for this thread, remove it from the m_isUse list.
if (m_readers.get() == reader && reader != null) {
m_inUse.remove(reader);
// for this thread, mark it as no longer being in use.
if (m_readers.get() == reader) {
m_readers.set(null);
m_inUse.put(reader, Boolean.FALSE);
}
m_inUse.remove(reader);
}
}
6 changes: 3 additions & 3 deletions xdocs/sources/xalan/history.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3286,7 +3286,7 @@ are unlikely to be equal. Saving them in a plain Vector has a
lower cost than saving them in DTMStringPool. Only prefixed QNames
are saved in DTMStringPool after this change.

Need to make changes in a few interfaces to accommadate this change.
Need to make changes in a few interfaces to accommodate this change.
<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref> on </ref>2003/03/13<br/><ref>Modified: </ref> xml-xalan/java/src/org/apache/xml/utils FastStringBuffer.java<br/><ref>Committer's log entry: </ref>
XSLTC_DTM performance work
Small improvement in FastStringBuffer.sendSAXCharacters() when the whole
Expand Down Expand Up @@ -4798,7 +4798,7 @@ alternatives.<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref>
transforms so that when the transformer is reused, we were using nodesets from
the previous transform which were using a different DTM. Note that we want keep
any variables that have been set externally by the user (using
Transformer.setParameter()).<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xpath/res XPATHErrorResources.java<br/><ref>Committer's log entry: </ref>bug 4762: Fixed the duplicate error message in XPATH.<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Bugzilla 4054: Retain previously set output properties when adding new ones.<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Bug 5872. We were using a constructor of TranformerException without the
Transformer.setParameter()).<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xpath/res XPATHErrorResources.java<br/><ref>Committer's log entry: </ref>bug 4762: Fixed the duplicate error message in XPATH.<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Bugzilla 4054: Retain previously set output properties when adding new ones.<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Bug 5872. We were using a constructor of TransformerException without the
locator information. Changed to code to use a locator if info is available.<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref> on </ref>01/30/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib NodeInfo.java<br/><ref>Committer's log entry: </ref>Changed "system id" to "public identifier" in javadoc
comments for publicId() methods.<br/><br/></li><li><ref>Committed by </ref>[email protected]<ref> on </ref>01/30/2002<br/><ref>Modified: </ref>java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java<br/><ref>Committer's log entry: </ref>Bugzilla 2617, part 1: Construct the data structures and access them
correctly.
Expand Down Expand Up @@ -6512,7 +6512,7 @@ Frame slot was available. Unfortunately, this also indicated that the item was
passed as a parameter which it wasn't. This fix changes isParamVar into to
fields, isAvailable which indicates that the slot is available and
isFromWithParam indicating the Frame slot came from an xsl:with-param or a
top-level parameter passed in via the tranformerImpl.setParameter() API.
top-level parameter passed in via the transformerImpl.setParameter() API.
I have tested this change against the conformance suite and had no
regression. I've also submitted a test case which fails on the existing
codebase but works okay after this fix.
Expand Down
2 changes: 1 addition & 1 deletion xdocs/sources/xalan/xsltc_usage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ parser</link>.</p>
<li>Perform the transformation, using a StreamSource object for the XML
input and a StreamResult object to hold the transformation output.</li>
</ol>
<p>Both a <code>Templates</code> object and a <code>Tranformer</code> object are
<p>Both a <code>Templates</code> object and a <code>Transformer</code> object are
processed representations of a stylesheet, but you cannot use a
<code>Templates</code> object to perform transformations. Instead,
you can use a <code>Templates</code> object to create new
Expand Down
Loading