[PATCH 7/8] add ignore flag @thumb to <image> to disable thumbnailurl generation

Signed-off-by: klObs <jw@klobs.de>
ds2013
dodo 10 years ago committed by klObs
parent 9e5777b5c8
commit 4ebdc5199d

@ -63,6 +63,7 @@
<!ATTLIST image
title CDATA #REQUIRED
class CDATA #IMPLIED
thumb (yes|no) #IMPLIED
>
<!ELEMENT event ((start), (end)?, (location)?)>

@ -143,6 +143,7 @@
<xs:complexType mixed="true">
<xs:attribute name="title" type="xs:string" use="required"/>
<xs:attribute name="class" type="xs:string" use="optional"/>
<xs:attribute name="thumb" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>

@ -58,7 +58,8 @@
<xsl:call-template name="normalize-path">
<xsl:with-param name="path">
<xsl:choose>
<xsl:when test="contains(string(.), '://') and contains(string(.), 'wikimedia.org')">
<!-- use it like this: <image thumb="no">http://upload.wikimedia.org/commons/h/ha/picture.img</image> -->
<xsl:when test="not(@thumb='no') and contains(string(.), '://') and contains(string(.), 'wikimedia.org')">
<xsl:variable name="filename">
<xsl:value-of select="string(str:tokenize(string(.),'/')[last()])"/>
</xsl:variable>

Loading…
Cancel
Save