Skip to content

Commit

Permalink
EZP-21315: added embed tags to schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed Mar 7, 2014
1 parent 953d3a5 commit 02b5d73
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 35 deletions.
Expand Up @@ -427,6 +427,63 @@
</element>
</define>

<define name="ez.embed">
<element name="ezembed">
<ref name="ez.embed.content"/>
</element>
</define>

<define name="ez.embedinline">
<element name="ezembedinline">
<ref name="ez.embed.content"/>
</element>
</define>

<define name="ez.embed.content">
<a:documentation>
content eZ Publish embed elements.
</a:documentation>
<ref name="ez.embed.attlist"/>
<optional>
<element name="ezconfig">
<ref name="ez.config.hash"/>
</element>
</optional>
</define>

<define name="ez.embed.attributes">
<ref name="db.xlink.href.attribute"/>
<optional>
<attribute name="view">
<data type="string"><param name="pattern">[A-Za-z][A-Za-z0-9_\-]*</param></data>
</attribute>
</optional>
<optional>
<ref name="ez.xhtml.align"/>
</optional>
<optional>
<ref name="ez.xhtml.class.attribute"/>
</optional>
</define>

<define name="ez.embed.attlist">
<ref name="ez.embed.attributes"/>
</define>

<define name="ez.config.hash">
<oneOrMore>
<element name="ezvalue">
<attribute name="key">
<text/>
</attribute>
<choice>
<ref name="ez.config.hash"/>
<text/>
</choice>
</element>
</oneOrMore>
</define>

<!--define name="ez.elements.all">
<interleave>
<zeroOrMore>
Expand All @@ -439,17 +496,17 @@
<a:documentation>
Adding ezxhtml:class attribute to the selected elements.
</a:documentation>
<define name="db.para.attlist" combine="interleave"><ref name="ez.xhtml.class"/></define>
<define name="db.title.attlist" combine="interleave"><ref name="ez.xhtml.class"/></define>
<!--define name="db.html.th.attlist" combine="interleave"><ref name="ez.xhtml.class"/></define-->
<!--define name="db.html.td.attlist" combine="interleave"><ref name="ez.xhtml.class"/></define-->
<define name="db.itemizedlist.attlist" combine="interleave"><ref name="ez.xhtml.class"/></define>
<define name="db.orderedlist.attlist" combine="interleave"><ref name="ez.xhtml.class"/></define>
<define name="db.listitem.attlist" combine="interleave"><ref name="ez.xhtml.class"/></define>
<define name="db.emphasis.attlist" combine="interleave"><ref name="ez.xhtml.class"/></define>
<!--define name="db.html.table.attributes" combine="interleave"><ref name="ez.xhtml.class"/></define-->
<define name="db.link.attlist" combine="interleave"><ref name="ez.xhtml.class"/></define>
<define name="ez.xhtml.class">
<define name="db.para.attlist" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define>
<define name="db.title.attlist" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define>
<!--define name="db.html.th.attlist" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define-->
<!--define name="db.html.td.attlist" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define-->
<define name="db.itemizedlist.attlist" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define>
<define name="db.orderedlist.attlist" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define>
<define name="db.listitem.attlist" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define>
<define name="db.emphasis.attlist" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define>
<!--define name="db.html.table.attributes" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define-->
<define name="db.link.attlist" combine="interleave"><ref name="ez.xhtml.class.attribute"/></define>
<define name="ez.xhtml.class.attribute">
<optional>
<attribute name="ezxhtml:class">
<data type="string"><param name="pattern">[A-Za-z][A-Za-z0-9_\-]*</param></data>
Expand Down Expand Up @@ -487,24 +544,55 @@
<a:documentation>
Adding ezxhtml:textalign attribute to the selected elements.
</a:documentation>
<define name="db.para.attlist" combine="interleave"><ref name="ez.xhtml.textalign"/></define>
<define name="db.title.attlist" combine="interleave"><ref name="ez.xhtml.textalign"/></define>
<define name="db.html.th.attlist" combine="interleave"><ref name="ez.xhtml.textalign"/></define>
<define name="db.html.td.attlist" combine="interleave"><ref name="ez.xhtml.textalign"/></define>
<define name="ez.xhtml.textalign">
<define name="db.para.attlist" combine="interleave">
<optional>
<attribute name="ezxhtml:textalign">
<choice>
<value>left</value>
<value>center</value>
<value>right</value>
<value>justify</value>
</choice>
</attribute>
<ref name="ez.xhtml.textalign"/>
</optional>
</define>
<define name="db.title.attlist" combine="interleave">
<optional>
<ref name="ez.xhtml.textalign"/>
</optional>
</define>
<define name="db.html.th.attlist" combine="interleave">
<optional>
<ref name="ez.xhtml.textalign"/>
</optional>
</define>
<define name="db.html.td.attlist" combine="interleave">
<optional>
<ref name="ez.xhtml.textalign"/>
</optional>
</define>
</div>

<define name="ez.xhtml.textalign">
<a:documentation>
ezxhtml:textalign attribute.
</a:documentation>
<attribute name="ezxhtml:textalign">
<choice>
<value>left</value>
<value>center</value>
<value>right</value>
<value>justify</value>
</choice>
</attribute>
</define>

<define name="ez.xhtml.align">
<a:documentation>
ezxhtml:align attribute.
</a:documentation>
<attribute name="ezxhtml:align">
<choice>
<value>left</value>
<value>center</value>
<value>right</value>
</choice>
</attribute>
</define>

<div>
<a:documentation>
Adding optional ezxhtml:level attribute to the "title" element.
Expand All @@ -517,47 +605,43 @@
<a:documentation>
Levels 1-6 are allowed, mapping to HTML H{level} tags.
</a:documentation>
<data type="string"><param name="pattern">[1-6]+</param></data>
<data type="string"><param name="pattern">[1-6]</param></data>
</choice>
</attribute>
</optional>
</define>
</div>

<define name="db.extension.inlines" combine="choice">
<a:documentation>
eZ Publish custom inline tags extension.
By default nothing is allowed, only an extension pattern is defined.
</a:documentation>
<zeroOrMore>
<choice>
<ref name="ez.embedinline"/>
<ref name="ez.extension.inlines"/>
</choice>
</zeroOrMore>
</define>

<define name="ez.extension.inlines">
<a:documentation>
Extension pattern for additional custom markup, to be combined with combine='choice'.
eZ Publish custom inline tags extension point.
By default nothing is allowed, only an extension pattern is defined.
</a:documentation>
<notAllowed/>
</define>

<define name="db.extension.blocks" combine="choice">
<a:documentation>
eZ Publish custom block tags extension.
By default nothing is allowed, only an extension pattern is defined.
</a:documentation>
<zeroOrMore>
<choice>
<ref name="ez.embed"/>
<ref name="ez.extension.blocks"/>
</choice>
</zeroOrMore>
</define>

<define name="ez.extension.blocks">
<a:documentation>
Extension pattern for additional custom markup, to be combined with combine='choice'.
eZ Publish custom block tags extension point.
By default nothing is allowed, only an extension pattern is defined.
</a:documentation>
<notAllowed/>
</define>
Expand Down
Expand Up @@ -39,6 +39,12 @@ Removed elements
* <textarea>
* <title>

Added elements
==============

* <ezembed>
* <ezembedinline>

Commented out elements we might support later:
==============================================

Expand Down
Expand Up @@ -973,6 +973,36 @@
<!--xs:attribute name="dir" type="dir" /-->
</xs:attributeGroup>

<!-- eZ Publish embeds ================================================= -->

<xs:complexType name="ezpublishEmbed">
<xs:sequence>
<xs:element name="ezconfig" type="ezconfig" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attributeGroup ref="ezembedAttributeGroup"/>
</xs:complexType>

<xs:complexType name="ezconfig" mixed="false">
<xs:sequence>
<xs:element name="ezvalue" type="ezvalue" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="key" type="token"/>
</xs:complexType>

<xs:complexType name="ezvalue" mixed="true">
<xs:sequence>
<xs:element name="ezvalue" type="ezvalue" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="key" type="token"/>
</xs:complexType>

<xs:attributeGroup name="ezembedAttributeGroup">
<xs:attribute name="href" type="uri" use="required"/>
<xs:attribute name="data-ezview" type="token" use="required"/>
<xs:attribute name="data-ezalign" type="token"/>
<xs:attribute name="class" type="tokens"/>
</xs:attributeGroup>

<!-- Common content models ============================================= -->

<xs:group name="flowContent">
Expand Down Expand Up @@ -1015,6 +1045,7 @@
<xs:element ref="table"/>
<!--xs:element name="canvas" type="canvasFlow"/-->
<!--xs:element ref="details"/-->
<xs:element name="ezembed" type="ezpublishEmbed"/>
</xs:choice>
</xs:group>

Expand Down Expand Up @@ -1053,6 +1084,7 @@
processContents="skip"/-->
<!--xs:any namespace="http://www.w3.org/1998/Math/MathML"
processContents="skip"/-->
<xs:element name="ezembedinline" type="ezpublishEmbed"/>
</xs:choice>
</xs:group>

Expand Down

0 comments on commit 02b5d73

Please sign in to comment.