You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2007/09/16 01:44:03 UTC

svn commit: r576002 - /xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp

Author: dbertoni
Date: Sat Sep 15 16:44:02 2007
New Revision: 576002

URL: http://svn.apache.org/viewvc?rev=576002&view=rev
Log:
Patch for Jira issue XALANC-653.

Modified:
    xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp

Modified: xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp?rev=576002&r1=576001&r2=576002&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp Sat Sep 15 16:44:02 2007
@@ -2176,6 +2176,73 @@
 
 
 
+inline void
+createAndAddNamespaceResultAttribute(
+            StylesheetExecutionContext&     theExecutionContext,
+            const XalanDOMString&           thePrefix,
+            const XalanDOMString&           theNamespaceURI,
+            XalanDOMString&                 theTempString)
+{
+    theTempString = DOMServices::s_XMLNamespaceWithSeparator;
+    theTempString.append(thePrefix);
+
+    theExecutionContext.addResultAttribute(
+        theTempString,
+        theNamespaceURI);
+}
+
+
+
+inline void
+createAndAddNamespaceResultAttribute(
+            StylesheetExecutionContext&     theExecutionContext,
+            const XalanDOMString&           thePrefix,
+            const XalanDOMString&           theNamespaceURI)
+{
+    typedef StylesheetExecutionContext::GetAndReleaseCachedString   GetAndReleaseCachedString;
+
+    const GetAndReleaseCachedString     theCachedString(theExecutionContext);
+
+    createAndAddNamespaceResultAttribute(
+        theExecutionContext,
+        thePrefix,
+        theNamespaceURI,
+        theCachedString.get());
+}
+
+
+
+inline void
+createFixedUpResultAttribute(
+            StylesheetExecutionContext&     theExecutionContext,
+            const XalanDOMString&           theLocalPart,
+            const XalanDOMString&           theNamespaceURI,
+            const XalanDOMString&           theValue)
+{
+    typedef StylesheetExecutionContext::GetAndReleaseCachedString   GetAndReleaseCachedString;
+
+    const GetAndReleaseCachedString     theCachedString(theExecutionContext);
+
+    XalanDOMString&     theBuffer = theCachedString.get();
+
+    theExecutionContext.getUniqueNamespaceValue(theBuffer);
+
+    createAndAddNamespaceResultAttribute(
+        theExecutionContext,
+        theBuffer,
+        theNamespaceURI);
+
+    theBuffer += XalanUnicode::charColon;
+
+    theBuffer += theLocalPart;
+
+    theExecutionContext.addResultAttribute(
+        theBuffer,
+        theValue);
+}
+
+
+
 void
 XSLTEngineImpl::cloneToResultTree(
             const XalanNode&        node,



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org