[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jibx-cvs
Subject:    [Jibx-cvs] core/build/src/org/jibx/runtime/impl
From:       Dennis Sosnoski <dsosnoski () users ! sourceforge ! net>
Date:       2008-07-27 2:18:41
Message-ID: E1KMvqM-0007D5-Us () mail ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/jibx/core/build/src/org/jibx/runtime/impl
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv4022/src/org/jibx/runtime/impl

Modified Files:
	XMLWriterNamespaceBase.java 
Log Message:
Change code to support pushing and popping translation tables at will, supporting \
null values for the table in the case where it remains unchanged.

Index: XMLWriterNamespaceBase.java
===================================================================
RCS file: /cvsroot/jibx/core/build/src/org/jibx/runtime/impl/XMLWriterNamespaceBase.java,v
 retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** XMLWriterNamespaceBase.java	17 Jul 2008 10:59:07 -0000	1.11
--- XMLWriterNamespaceBase.java	27 Jul 2008 02:18:39 -0000	1.12
***************
*** 70,75 ****
      private int[] m_translateTable;
      
!     /** Stack of namespace translation tables in use (<code>null</code> if
!      none). */
      private Stack m_translateTableStack;
      
--- 70,74 ----
      private int[] m_translateTable;
      
!     /** Stack of namespace translation tables in use. */
      private Stack m_translateTableStack;
      
***************
*** 89,92 ****
--- 88,92 ----
          m_namespaceStack = new Stack();
          m_namespaceDepth = -1;
+         m_translateTableStack = new Stack();
      }
      
***************
*** 547,560 ****
       * bindings. The translated values must match the internal tables.
       *
!      * @param table translation table to be used
       */
      public void pushTranslationTable(int[] table) {
!         if (m_translateTable != null) {
!             if (m_translateTableStack == null) {
!                 m_translateTableStack = new Stack();
!             }
!             m_translateTableStack.push(m_translateTable);
          }
-         m_translateTable = table;
      }
      
--- 547,558 ----
       * bindings. The translated values must match the internal tables.
       *
!      * @param table translation table to be used (<code>null</code> if no
!      * change)
       */
      public void pushTranslationTable(int[] table) {
!         m_translateTableStack.push(m_translateTable);
!         if (table != null) {
!             m_translateTable = table;
          }
      }
      
***************
*** 564,572 ****
       */
      public void popTranslationTable() {
!         if (m_translateTableStack != null && m_translateTableStack.size() > 0) {
!             m_translateTable = (int[])m_translateTableStack.pop();
!         } else {
!             m_translateTable = null;
!         }
      }
      
--- 562,566 ----
       */
      public void popTranslationTable() {
!         m_translateTable = (int[])m_translateTableStack.pop();
      }
      


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jibx-cvs mailing list
Jibx-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic