Revision: 3988
          http://vexi.svn.sourceforge.net/vexi/?rev=3988&view=rev
Author:   clrg
Date:     2011-01-14 14:37:46 +0000 (Fri, 14 Jan 2011)

Log Message:
-----------
Force ids to be unique in VML

Modified Paths:
--------------
    trunk/org.vexi-core.main/src/main/java/org/vexi/core/VMLBuilder.java

Modified: trunk/org.vexi-core.main/src/main/java/org/vexi/core/VMLBuilder.java
===================================================================
--- trunk/org.vexi-core.main/src/main/java/org/vexi/core/VMLBuilder.java        
2010-12-22 04:03:48 UTC (rev 3987)
+++ trunk/org.vexi-core.main/src/main/java/org/vexi/core/VMLBuilder.java        
2011-01-14 14:37:46 UTC (rev 3988)
@@ -223,6 +223,7 @@
         private int state = STATE_INITIAL;
         int meta_start = -1;  // Used in calculating endLines to add to 
static_content
         
+        Basket.Array idlist = new Basket.Array();
         Vec nodeStack = new Vec();
         Template t = null;
         CodeBlock cb = null;
@@ -363,6 +364,10 @@
                 String v = a.getVal(i);
                 if (k.equals("id")) {
                     t.id = v.toString().intern();
+                    if (idlist.containsValue(t.id)) {
+                        throw new XML.Exn("duplicate node id '"+t.id+"'", 
XML.Exn.SCHEMA, getLine(), -1);
+                    }
+                    idlist.add(t.id);
                     continue ATTR;
                 }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to