[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:
parent
9e5777b5c8
commit
4ebdc5199d
|
@ -63,6 +63,7 @@
|
||||||
<!ATTLIST image
|
<!ATTLIST image
|
||||||
title CDATA #REQUIRED
|
title CDATA #REQUIRED
|
||||||
class CDATA #IMPLIED
|
class CDATA #IMPLIED
|
||||||
|
thumb (yes|no) #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT event ((start), (end)?, (location)?)>
|
<!ELEMENT event ((start), (end)?, (location)?)>
|
||||||
|
|
|
@ -143,6 +143,7 @@
|
||||||
<xs:complexType mixed="true">
|
<xs:complexType mixed="true">
|
||||||
<xs:attribute name="title" type="xs:string" use="required"/>
|
<xs:attribute name="title" type="xs:string" use="required"/>
|
||||||
<xs:attribute name="class" type="xs:string" use="optional"/>
|
<xs:attribute name="class" type="xs:string" use="optional"/>
|
||||||
|
<xs:attribute name="thumb" type="xs:string" use="optional"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,8 @@
|
||||||
<xsl:call-template name="normalize-path">
|
<xsl:call-template name="normalize-path">
|
||||||
<xsl:with-param name="path">
|
<xsl:with-param name="path">
|
||||||
<xsl:choose>
|
<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:variable name="filename">
|
||||||
<xsl:value-of select="string(str:tokenize(string(.),'/')[last()])"/>
|
<xsl:value-of select="string(str:tokenize(string(.),'/')[last()])"/>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
Loading…
Reference in New Issue