Manage namedTagData ('<div>') +.

This commit is contained in:
administrateur 2007-01-31 05:52:15 +01:00
parent 00e729af30
commit dd4b054b15
4 changed files with 38 additions and 39 deletions

Binary file not shown.

BIN
dist/xid.jar vendored

Binary file not shown.

View file

@ -263,42 +263,6 @@ public class Presenter
} }
/**
*
*/
static public Attributes getNamedTagAttributes (TagsDataById datas, String name)
{
Attributes result;
if ((name == null) || (datas == null))
{
result = null;
}
else
{
TagDataCore dataCore = datas.getId ("<" + name + ">");
if (dataCore == null)
{
result = null;
}
else if (!(dataCore instanceof TagData))
{
result = null;
}
else
{
TagData data = (TagData) dataCore;
result = data.getAttributes ();
}
}
//
return (result);
}
/** /**
* *
*/ */
@ -705,7 +669,7 @@ public class Presenter
result.append (node.getNodeName()); result.append (node.getNodeName());
// Build attributes. // Build attributes.
result.append (processAttributes (attrs, data.getAttributes (), getNamedTagAttributes (datas, node.getNodeName ()), prefix)); result.append (processAttributes (attrs, data.getAttributes (), datas.getNamedTagAttributes (node.getNodeName ()), prefix));
if ((node.getChildNodes () == null) && if ((node.getChildNodes () == null) &&
((data == null) || data.display ().equals (""))) ((data == null) || data.display ().equals ("")))
@ -751,7 +715,7 @@ public class Presenter
result.append (node.getNodeName()); result.append (node.getNodeName());
// Build attributes. // Build attributes.
result.append (processAttributes (attrs, data.getAttributes (), getNamedTagAttributes (datas, node.getNodeName ()), Integer.toString (nLine))); result.append (processAttributes (attrs, data.getAttributes (), datas.getNamedTagAttributes (node.getNodeName ()), Integer.toString (nLine)));
if ((node.getChildNodes () == null) && if ((node.getChildNodes () == null) &&
((data == null) || data.display ().equals (""))) ((data == null) || data.display ().equals ("")))
@ -974,7 +938,7 @@ public class Presenter
// Build the tag attributes. // Build the tag attributes.
result.append (processAttributes (node.getAttributes (), result.append (processAttributes (node.getAttributes (),
getNamedTagAttributes (datas, node.getNodeName ()), datas.getNamedTagAttributes (node.getNodeName ()),
null, null,
prefix)); prefix));

View file

@ -36,4 +36,39 @@ public class TagsDataById extends HashMap<String, TagDataCore> implements TagDat
// //
return (result); return (result);
} }
/*
*
*/
public Attributes getNamedTagAttributes (String name)
{
Attributes result;
if (name == null)
{
result = null;
}
else
{
TagDataCore dataCore = this.getId ("<" + name + ">");
if (dataCore == null)
{
result = null;
}
else if (!(dataCore instanceof TagData))
{
result = null;
}
else
{
TagData data = (TagData) dataCore;
result = data.getAttributes ();
}
}
//
return (result);
}
} }