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

Signed-off-by: klObs <jw@klobs.de>
This commit is contained in:
dodo 2013-03-31 17:01:56 +02:00 committed by klObs
parent 9e5777b5c8
commit 4ebdc5199d
3 changed files with 4 additions and 1 deletions

View File

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

View File

@ -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>

View File

@ -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>