IDEA-56393 inside -> withParent

This commit is contained in:
Gregory Shrago
2010-07-12 16:43:24 +04:00
parent 18875e5dc0
commit d7801368e3
2 changed files with 4 additions and 4 deletions
@@ -145,7 +145,7 @@ public class XmlAttributeInjection extends AbstractTagInjection {
if (StringUtil.isNotEmpty(name)) appendStringPattern(result, ".withLocalName(", name, ")");
if (StringUtil.isNotEmpty(namespace)) appendStringPattern(result, ".withNamespace(", namespace, ")");
if (StringUtil.isNotEmpty(injection.getTagName()) || StringUtil.isNotEmpty(injection.getTagNamespace())) {
result.append(".inside(").append(XmlTagInjection.getPatternString(injection)).append(")");
result.append(".withParent(").append(XmlTagInjection.getPatternString(injection)).append(")");
}
return result.toString();
}
@@ -7,16 +7,16 @@
</injection>
<injection language="XPath" injector-id="xml">
<display-name>JAXB attribute node</display-name>
<place><![CDATA[xmlAttribute().withLocalName(string().equalTo("node")).inside(xmlTag().withLocalName(string().equalTo("bindings")).withNamespace(string().equalTo("http://java.sun.com/xml/ns/jaxb")))]]></place>
<place><![CDATA[xmlAttribute().withLocalName(string().equalTo("node")).withParent(xmlTag().withLocalName(string().equalTo("bindings")).withNamespace(string().equalTo("http://java.sun.com/xml/ns/jaxb")))]]></place>
</injection>
<injection language="JavaScript" injector-id="xml">
<display-name>*/@href</display-name>
<value-pattern>^javascript:(.+)</value-pattern>
<place><![CDATA[xmlAttribute().withLocalName(string().equalTo("href")).inside(xmlTag().withNamespace(string().equalTo("http://www.w3.org/1999/xhtml")))]]></place>
<place><![CDATA[xmlAttribute().withLocalName(string().equalTo("href")).withParent(xmlTag().withNamespace(string().equalTo("http://www.w3.org/1999/xhtml")))]]></place>
</injection>
<injection language="JavaScript" injector-id="xml">
<display-name>*/@on.*</display-name>
<place><![CDATA[xmlAttribute().withLocalName(string().matches("on.*")).inside(xmlTag().withNamespace(string().equalTo("http://www.w3.org/1999/xhtml")))]]></place>
<place><![CDATA[xmlAttribute().withLocalName(string().matches("on.*")).withParent(xmlTag().withNamespace(string().equalTo("http://www.w3.org/1999/xhtml")))]]></place>
</injection>
<injection language="CSS" injector-id="xml">
<display-name>*/@style</display-name>