You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by ar...@apache.org on 2003/08/13 14:24:41 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/processor XSLTElementProcessor.java
aruny 2003/08/13 05:24:41
Modified: java/src/org/apache/xalan/processor Tag: jaxp-1_3_0-branch
XSLTElementProcessor.java
Log:
Description : In forward-compatible mode, an unknown attribute should be ignored rather than throwing an exception.
Revision Changes Path
No revision
No revision
1.16.4.1 +19 -6 xml-xalan/java/src/org/apache/xalan/processor/XSLTElementProcessor.java
Index: XSLTElementProcessor.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTElementProcessor.java,v
retrieving revision 1.16
retrieving revision 1.16.4.1
diff -u -r1.16 -r1.16.4.1
--- XSLTElementProcessor.java 30 Jan 2003 18:45:45 -0000 1.16
+++ XSLTElementProcessor.java 13 Aug 2003 12:24:41 -0000 1.16.4.1
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,16 +56,23 @@
*/
package org.apache.xalan.processor;
-import java.util.Vector;
+import org.xml.sax.InputSource;
+import org.xml.sax.Attributes;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.DTDHandler;
+import org.xml.sax.ContentHandler;
import org.apache.xalan.res.XSLMessages;
import org.apache.xalan.res.XSLTErrorResources;
import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.templates.Constants;
import org.apache.xml.utils.IntStack;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
import org.xml.sax.helpers.AttributesImpl;
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.TransformerException;
+
+import java.util.Vector;
/**
* This class acts as the superclass for all stylesheet element
@@ -326,7 +333,13 @@
{
XSLTElementDef def = getElemDef();
- AttributesImpl undefines = throwError ? null : new AttributesImpl();
+
+ AttributesImpl undefines = null;
+ boolean isCompatibleMode = ((null != handler.getStylesheet()
+ && handler.getStylesheet().getCompatibleMode())
+ || !throwError);
+ if (isCompatibleMode)
+ undefines = new AttributesImpl();
// Keep track of which XSLTAttributeDefs have been processed, so
// I can see which default values need to be set.
@@ -351,7 +364,7 @@
if (null == attrDef)
{
- if (throwError)
+ if (!isCompatibleMode)
{
// Then barf, because this element does not allow this attribute.
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org