bloritsch 00/10/30 12:20:04
Modified: src/org/apache/cocoon/components/language/markup/sitemap
Tag: xml-cocoon2 SitemapMarkupLanguage.java
Log:
Remaining bit from Xalan2 integration that somehow did not get committed.
Revision Changes Path
No revision
No revision
1.1.2.7 +12 -2
xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/Attic/SitemapMarkupLanguage.java
Index: SitemapMarkupLanguage.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/Attic/SitemapMarkupLanguage.java,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- SitemapMarkupLanguage.java 2000/10/12 16:43:42 1.1.2.6
+++ SitemapMarkupLanguage.java 2000/10/30 20:20:01 1.1.2.7
@@ -37,7 +37,7 @@
* <a href="http://xml.apache.org/cocoon/sitemap.html">Sitemap</a>.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.6 $ $Date: 2000/10/12 16:43:42 $
+ * @version CVS $Revision: 1.1.2.7 $ $Date: 2000/10/30 20:20:01 $
*/
public class SitemapMarkupLanguage extends AbstractMarkupLanguage {
@@ -165,6 +165,11 @@
this.language = language;
}
+ public void setParent(XMLReader reader) {
+ reader.setContentHandler(this);
+ super.setParent(reader);
+ }
+
public void startDocument() throws SAXException {
super.startDocument();
isRootElem = true;
@@ -187,7 +192,12 @@
String path =
this.filename.substring(0,
pos).replace(File.separatorChar, '/');
// update the attributes
- AttributesImpl newAtts = new AttributesImpl(atts);
+ AttributesImpl newAtts = new AttributesImpl();
+ // FIXME (SSA) workaround a bug in SAX2 that goes in infinite
loop
+ // when atts.getLength() == 0
+ if (atts.getLength()>0)
+ newAtts.setAttributes(atts);
+
newAtts.addAttribute("", "file-name", "file-name", "CDATA",
name);
newAtts.addAttribute("", "file-path", "file-path", "CDATA",
path);
newAtts.addAttribute("", "creation-date", "creation-date",