zongaro 2004/01/06 07:20:12
Modified: java/src/org/apache/xalan/xsltc/dom Tag: xslt20-compiled
SAXImpl.java
test/tests/accept-gold/generated Tag: xslt20-compiled
generated01.XalanJ-C.out generated02.XalanJ-C.out
generated03.XalanJ-C.out
Log:
SAXImpl.startDocument was calling SAX2DTM.startDocument followed by
SAX2DTM.startPrefixMapping for the xml prefix. However, the
SAX2DTM.startElement always ensures the xml prefix is declared for the first
element. The effect of the startPrefixMapping call was to create two
namespace
nodes on the first element declaring the xml prefix. This had no discernible
consequence, except to throw off the numbering of subsequent nodes with the
generate-id() function.
I've eliminated the redundant call to startPrefixMapping, and adjusted the
gold
test output files for the generate-id function.
Reviewed by Christine Li (jycli at ca.ibm.com)
Revision Changes Path
No revision
No revision
1.8.2.5 +3 -6
xml-xalan/java/src/org/apache/xalan/xsltc/dom/SAXImpl.java
Index: SAXImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/SAXImpl.java,v
retrieving revision 1.8.2.4
retrieving revision 1.8.2.5
diff -u -r1.8.2.4 -r1.8.2.5
--- SAXImpl.java 4 Dec 2003 20:58:41 -0000 1.8.2.4
+++ SAXImpl.java 6 Jan 2004 15:20:12 -0000 1.8.2.5
@@ -4,7 +4,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -914,10 +914,7 @@
super.startDocument();
_nsIndex.put(new Integer(0), new Integer(_uriCount++));
-
- super.startPrefixMapping(XML_PREFIX, XML_URI);
- Integer eType = new Integer(getIdForNamespace(XML_URI));
- _nsIndex.put(eType, new Integer(_uriCount++));
+ definePrefixAndUri(XML_PREFIX, XML_URI);
}
/**
No revision
No revision
1.2.2.1 +7 -7
xml-xalan/test/tests/accept-gold/generated/generated01.XalanJ-C.out
Index: generated01.XalanJ-C.out
===================================================================
RCS file:
/home/cvs/xml-xalan/test/tests/accept-gold/generated/generated01.XalanJ-C.out,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- generated01.XalanJ-C.out 2 Apr 2003 18:15:13 -0000 1.2
+++ generated01.XalanJ-C.out 6 Jan 2004 15:20:12 -0000 1.2.2.1
@@ -1,24 +1,24 @@
<HTML>
<P>Reference numbers should match the titles, links should work.</P>
<HR>
-<H1 id="N65541">1. Introduction</H1>
+<H1 id="N65540">1. Introduction</H1>
Introduction
- <P>For more information see the <A href="#N65579">3. Expressions</A>
section.</P>
+ <P>For more information see the <A href="#N65578">3. Expressions</A>
section.</P>
<P>(alternate id link: id3)</P>
<HR>
-<H1 id="N65560">2. Stylesheet Structure</H1>
+<H1 id="N65559">2. Stylesheet Structure</H1>
Stylesheet Structure
- <P>For more information see the <A href="#N65541">1. Introduction</A>
section.</P>
+ <P>For more information see the <A href="#N65540">1. Introduction</A>
section.</P>
<P>(alternate id link: id1)</P>
<HR>
-<H1 id="N65579">3. Expressions</H1>
+<H1 id="N65578">3. Expressions</H1>
Expressions
- <P>For more information see the <A href="#N65560">2. Stylesheet
Structure</A> section.</P>
+ <P>For more information see the <A href="#N65559">2. Stylesheet
Structure</A> section.</P>
<P>(alternate id link: id2)</P>
-</HTML>
\ No newline at end of file
+</HTML>
1.2.2.1 +1 -1
xml-xalan/test/tests/accept-gold/generated/generated02.XalanJ-C.out
Index: generated02.XalanJ-C.out
===================================================================
RCS file:
/home/cvs/xml-xalan/test/tests/accept-gold/generated/generated02.XalanJ-C.out,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- generated02.XalanJ-C.out 2 Apr 2003 18:15:13 -0000 1.2
+++ generated02.XalanJ-C.out 6 Jan 2004 15:20:12 -0000 1.2.2.1
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<out>N65537,N65540,N65541,N65542,;N65543,;N65544,;N65545,;N65546,;N65547,N65548,N65549,;N65550,N65551,N65552,;N65553,;;N65554,;;N65555,;</out>
\ No newline at end of file
+<out>N65537,N65539,N65540,N65541,;N65542,;N65543,;N65544,;N65545,;N65546,N65547,N65548,;N65549,N65550,N65551,;N65552,;;N65553,;;N65554,;</out>
1.3.2.1 +1 -1
xml-xalan/test/tests/accept-gold/generated/generated03.XalanJ-C.out
Index: generated03.XalanJ-C.out
===================================================================
RCS file:
/home/cvs/xml-xalan/test/tests/accept-gold/generated/generated03.XalanJ-C.out,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- generated03.XalanJ-C.out 30 Jun 2003 17:41:08 -0000 1.3
+++ generated03.XalanJ-C.out 6 Jan 2004 15:20:12 -0000 1.3.2.1
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<out><values>3A-Hello, 3B-Shirt, 3B-Overt, 3C-GoodBye, 3D-Tie, 3D-Sly,
</values>
-<ids>N196613, N262149, N262152, N327685, N393221, N393224, </ids></out>
\ No newline at end of file
+<ids>N196612, N262148, N262151, N327684, N393220, N393223, </ids></out>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]