Manage a prefix for the TagsData processAttributes.
This commit is contained in:
parent
d0606fe62e
commit
cbfbfc71d5
6 changed files with 26 additions and 4 deletions
Binary file not shown.
Binary file not shown.
BIN
dist/test.jar
vendored
BIN
dist/test.jar
vendored
Binary file not shown.
BIN
dist/xid.jar
vendored
BIN
dist/xid.jar
vendored
Binary file not shown.
|
@ -495,7 +495,7 @@ public class Presenter
|
||||||
result.append (node.getNodeName());
|
result.append (node.getNodeName());
|
||||||
|
|
||||||
// Build attributes.
|
// Build attributes.
|
||||||
result.append (processAttributes (attrs, data));
|
result.append (processAttributes (attrs, data, Integer.toString (nLine)));
|
||||||
|
|
||||||
if ((node.getChildNodes () == null) &&
|
if ((node.getChildNodes () == null) &&
|
||||||
((data == null) || data.display ().equals ("")))
|
((data == null) || data.display ().equals ("")))
|
||||||
|
@ -1039,6 +1039,20 @@ public class Presenter
|
||||||
{
|
{
|
||||||
StringBuffer result;
|
StringBuffer result;
|
||||||
|
|
||||||
|
result = processAttributes (attrs, model, "");
|
||||||
|
|
||||||
|
//
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static protected StringBuffer processAttributes (NamedNodeMap attrs, TagData model, String prefix)
|
||||||
|
{
|
||||||
|
StringBuffer result;
|
||||||
|
|
||||||
result = new StringBuffer ();
|
result = new StringBuffer ();
|
||||||
|
|
||||||
// Build the original attributes list.
|
// Build the original attributes list.
|
||||||
|
@ -1089,8 +1103,16 @@ public class Presenter
|
||||||
while (iterator.hasNext ())
|
while (iterator.hasNext ())
|
||||||
{
|
{
|
||||||
Map.Entry<String, String> attribute = (Map.Entry<String, String>) iterator.next();
|
Map.Entry<String, String> attribute = (Map.Entry<String, String>) iterator.next();
|
||||||
|
|
||||||
|
if (attribute.getKey ().equals ("id"))
|
||||||
|
{
|
||||||
|
result.append(" " + attribute.getKey () + "=\"" + attribute.getValue () + '_' + prefix + "\"");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
result.append(" " + attribute.getKey () + "=\"" + attribute.getValue ()+ "\"");
|
result.append(" " + attribute.getKey () + "=\"" + attribute.getValue ()+ "\"");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
return (result);
|
return (result);
|
||||||
|
|
Loading…
Reference in a new issue