Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure <eztemplate> elements contains <ezcontent> child #113

Merged
merged 1 commit into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@
<xsl:with-param name="align" select="@custom:align"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="./* | ./text()">
<xsl:element name="ezcontent" namespace="http://docbook.org/ns/docbook">
<xsl:apply-templates/>
</xsl:element>
</xsl:if>
<xsl:element name="ezcontent" namespace="http://docbook.org/ns/docbook">
<xsl:apply-templates/>
</xsl:element>
<xsl:if test="@*[namespace-uri() = 'http://ez.no/namespaces/ezpublish3/custom/' and not( local-name() = 'class' ) and not( local-name() = 'align' )]">
<xsl:element name="ezconfig" namespace="http://docbook.org/ns/docbook">
<xsl:for-each select="@*[namespace-uri() = 'http://ez.no/namespaces/ezpublish3/custom/' and not( local-name() = 'class' ) and not( local-name() = 'align' )]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
</ezconfig>
</eztemplate>
<eztemplate name="externalimage" ezxhtml:class="templateClass2" ezxhtml:align="right">
<ezcontent/>
<ezconfig>
<ezvalue key="src">http://upload.wikimedia.org/wikipedia/commons/c/c6/R-S_mk2.gif</ezvalue>
<ezvalue key="height">365</ezvalue>
Expand All @@ -43,6 +44,11 @@
<eztemplate name="factoidbox" ezxhtml:class="templateClass3" ezxhtml:align="center">
<ezcontent>It is widely known that the bistable multivibrator hums z's in the middle octave key of E.</ezcontent>
</eztemplate>
<eztemplate name="factoidbox" ezxhtml:class="templateClass4" ezxhtml:align="center"/>
<eztemplate name="factoidbox" ezxhtml:class="templateClass4"/>
<eztemplate name="factoidbox" ezxhtml:class="templateClass4" ezxhtml:align="center">
<ezcontent/>
</eztemplate>
<eztemplate name="factoidbox" ezxhtml:class="templateClass4">
<ezcontent/>
</eztemplate>

</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<section
xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"
xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/">
<section>
<custom name="linebreak"/>
</section>
<!-- xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/"-->
<paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">
<custom name="mycustomtag" custom:class="templateClass" custom:align="left" custom:title="foobar"/>
</paragraph>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
warning:Custom tag 'linebreak' converted to block custom tag. It might have been inline custom tag in legacy DB where contentobject_attribute.id=
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom"
xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0">
<eztemplate name="linebreak"/>
<eztemplate name="linebreak">
<ezcontent/>
</eztemplate>
<eztemplate name="mycustomtag" ezxhtml:align="left" ezxhtml:class="templateClass">
<ezcontent>
custom tag content
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<section
xmlns="http://docbook.org/ns/docbook"
xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom"
xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0">
<eztemplate name="linebreak">
<ezcontent/>
</eztemplate>
<eztemplate name="mycustomtag" ezxhtml:align="left" ezxhtml:class="templateClass">
<ezcontent/>
<ezconfig>
<ezvalue key="title">foobar</ezvalue>
</ezconfig>
</eztemplate>
</section>