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: ...@@ -44,7 +44,6 @@ documentation for that file. The schema has two parts:
<ref name="attribute-element"/> <ref name="attribute-element"/>
<ref name="data-element"/> <ref name="data-element"/>
<ref name="ref-element"/> <ref name="ref-element"/>
<ref name="text-element"/>
</choice> </choice>
</oneOrMore> </oneOrMore>
</element> </element>
...@@ -56,7 +55,7 @@ documentation for that file. The schema has two parts: ...@@ -56,7 +55,7 @@ documentation for that file. The schema has two parts:
Example: Example:
<attribute name="name"> <attribute name="name">
<text/> <data type="string"/>
</attribute> </attribute>
--> -->
<define name="attribute-element"> <define name="attribute-element">
...@@ -68,7 +67,6 @@ documentation for that file. The schema has two parts: ...@@ -68,7 +67,6 @@ documentation for that file. The schema has two parts:
<choice> <choice>
<ref name="data-element"/> <ref name="data-element"/>
<ref name="ref-element"/> <ref name="ref-element"/>
<ref name="text-element"/>
</choice> </choice>
</zeroOrMore> </zeroOrMore>
</element> </element>
...@@ -84,16 +82,6 @@ documentation for that file. The schema has two parts: ...@@ -84,16 +82,6 @@ documentation for that file. The schema has two parts:
</element> </element>
</define> </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. Describes an enumeration element: a possible value for an attribute.
--> -->
...@@ -120,7 +108,6 @@ documentation for that file. The schema has two parts: ...@@ -120,7 +108,6 @@ documentation for that file. The schema has two parts:
<ref name="data-element"/> <ref name="data-element"/>
<ref name="element-element"/> <ref name="element-element"/>
<ref name="ref-element"/> <ref name="ref-element"/>
<ref name="text-element"/>
<ref name="value-element"/> <ref name="value-element"/>
</choice> </choice>
</oneOrMore> </oneOrMore>
......
...@@ -88,7 +88,7 @@ def resourceForAttribute(nsNode, attrNode): ...@@ -88,7 +88,7 @@ def resourceForAttribute(nsNode, attrNode):
break break
if not len(resourceName): 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" resourceName = "String"
elif len([i for i in attrNode.getElementsByTagName("data") if i.getAttribute("type") == "boolean"]): elif len([i for i in attrNode.getElementsByTagName("data") if i.getAttribute("type") == "boolean"]):
resourceName = "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