Kaydet (Commit) ef72ed43 authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: remove <text> alias for <data type="string">

Change-Id: I44630ebc4395b86ae4f44c85d596b589a93b54b0
Reviewed-on: https://gerrit.libreoffice.org/15159Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst d30ac3f4
......@@ -44,7 +44,6 @@ documentation for that file. The schema has two parts:
<ref name="attribute-element"/>
<ref name="data-element"/>
<ref name="ref-element"/>
<ref name="text-element"/>
</choice>
</oneOrMore>
</element>
......@@ -56,7 +55,7 @@ documentation for that file. The schema has two parts:
Example:
<attribute name="name">
<text/>
<data type="string"/>
</attribute>
-->
<define name="attribute-element">
......@@ -68,7 +67,6 @@ documentation for that file. The schema has two parts:
<choice>
<ref name="data-element"/>
<ref name="ref-element"/>
<ref name="text-element"/>
</choice>
</zeroOrMore>
</element>
......@@ -84,16 +82,6 @@ documentation for that file. The schema has two parts:
</element>
</define>
<!--
Describes that the data used inside the parent (element or attribute) is a
string. It is just a short-hand for <data type="string"/>.
-->
<define name="text-element">
<element name="text" ns="http://relaxng.org/ns/structure/1.0">
<empty/>
</element>
</define>
<!--
Describes an enumeration element: a possible value for an attribute.
-->
......@@ -120,7 +108,6 @@ documentation for that file. The schema has two parts:
<ref name="data-element"/>
<ref name="element-element"/>
<ref name="ref-element"/>
<ref name="text-element"/>
<ref name="value-element"/>
</choice>
</oneOrMore>
......
......@@ -88,7 +88,7 @@ def resourceForAttribute(nsNode, attrNode):
break
if not len(resourceName):
if len(attrNode.getElementsByTagName("text") + [i for i in attrNode.getElementsByTagName("data") if i.getAttribute("type") in ("base64Binary", "string")]):
if len([i for i in attrNode.getElementsByTagName("data") if i.getAttribute("type") in ("base64Binary", "string")]):
resourceName = "String"
elif len([i for i in attrNode.getElementsByTagName("data") if i.getAttribute("type") == "boolean"]):
resourceName = "Boolean"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment