diff --git a/build/classes/xid/Presenter.class b/build/classes/xid/Presenter.class index 60cd683..473dcc8 100644 Binary files a/build/classes/xid/Presenter.class and b/build/classes/xid/Presenter.class differ diff --git a/build_test/classes/xid/test/Test.class b/build_test/classes/xid/test/Test.class index 0a7ab99..17cec62 100644 Binary files a/build_test/classes/xid/test/Test.class and b/build_test/classes/xid/test/Test.class differ diff --git a/dist/test.jar b/dist/test.jar index 8e52c59..5fbd7ba 100644 Binary files a/dist/test.jar and b/dist/test.jar differ diff --git a/dist/xid.jar b/dist/xid.jar index 7a84700..a30bc79 100644 Binary files a/dist/xid.jar and b/dist/xid.jar differ diff --git a/src/xid/Presenter.java b/src/xid/Presenter.java index dbd55d8..0e8f29d 100644 --- a/src/xid/Presenter.java +++ b/src/xid/Presenter.java @@ -495,7 +495,7 @@ public class Presenter result.append (node.getNodeName()); // Build attributes. - result.append (processAttributes (attrs, data)); + result.append (processAttributes (attrs, data, Integer.toString (nLine))); if ((node.getChildNodes () == null) && ((data == null) || data.display ().equals (""))) @@ -1039,6 +1039,20 @@ public class Presenter { StringBuffer result; + result = processAttributes (attrs, model, ""); + + // + return (result); + } + + + /* + * + */ + static protected StringBuffer processAttributes (NamedNodeMap attrs, TagData model, String prefix) + { + StringBuffer result; + result = new StringBuffer (); // Build the original attributes list. @@ -1089,7 +1103,15 @@ public class Presenter while (iterator.hasNext ()) { Map.Entry attribute = (Map.Entry) iterator.next(); - result.append(" " + attribute.getKey () + "=\"" + attribute.getValue ()+ "\""); + + if (attribute.getKey ().equals ("id")) + { + result.append(" " + attribute.getKey () + "=\"" + attribute.getValue () + '_' + prefix + "\""); + } + else + { + result.append(" " + attribute.getKey () + "=\"" + attribute.getValue ()+ "\""); + } } // diff --git a/test/xid/test/Test.java b/test/xid/test/Test.java index f1fd338..2d03921 100644 --- a/test/xid/test/Test.java +++ b/test/xid/test/Test.java @@ -235,7 +235,7 @@ class Test errorMessage = new StringBuffer (); - html = Presenter.doXid ("", datas, "", errorMessage); + html = Presenter.doXid ("", datas, "", errorMessage); System.out.println ("----------------------------"); System.out.println ("datas = new TagsDataId ();"); @@ -247,7 +247,7 @@ class Test System.out.println ("datas.setContent (\"words\", 5, \"fox\");"); System.out.println ("+"); System.out.println (""); System.out.println ("=>"); System.out.println (html);