@@ -26,9 +26,9 @@ see alternative https://gist.github.com/tfmorris/5977784
26
26
27
27
28
28
29
- <xsl : param name =" ImageFile_Path_and_ImageFile" required = " yes " ></xsl : param >
30
- <xsl : param name =" ImageFile_format" required = " yes " ></xsl : param >
31
- <xsl : param name =" CSS_Stylesheet" required = " yes " ></xsl : param >
29
+ <xsl : param name =" ImageFile_Path_and_ImageFile" ></xsl : param >
30
+ <xsl : param name =" ImageFile_format" ></xsl : param >
31
+ <xsl : param name =" CSS_Stylesheet" ></xsl : param >
32
32
33
33
<xsl : variable name =" document-uri" select =" document-uri(.)" />
34
34
@@ -43,7 +43,9 @@ see alternative https://gist.github.com/tfmorris/5977784
43
43
</xsl : text >
44
44
<html >
45
45
<head >
46
- <link rel =" stylesheet" ><xsl : attribute name =" href" ><xsl : value-of select =" $CSS_Stylesheet" /></xsl : attribute ></link >
46
+ <xsl : if test =" normalize-space($ImageFile_Path_and_ImageFile) != ''" >
47
+ <link rel =" stylesheet" ><xsl : attribute name =" href" ><xsl : value-of select =" $CSS_Stylesheet" /></xsl : attribute ></link >
48
+ </xsl : if >
47
49
<title >OCR Output</title >
48
50
<meta name =" description" ><xsl : attribute name =" content" >OCR Output produced by <xsl : value-of select =" ./@producer" /></xsl : attribute ></meta >
49
51
</head >
@@ -62,7 +64,9 @@ see alternative https://gist.github.com/tfmorris/5977784
62
64
<xsl : value-of select =" @width" />
63
65
<xsl : text > </xsl : text >
64
66
<xsl : value-of select =" @height" />
65
- <xsl : text > image </xsl : text ><xsl : text > </xsl : text ><xsl : value-of select =" $ImageFile_Path_and_ImageFile" />.<xsl : value-of select =" $ImageFile_format" /><xsl : text ></xsl : text >
67
+ <xsl : if test =" normalize-space($ImageFile_Path_and_ImageFile) != ''" >
68
+ <xsl : text > image </xsl : text ><xsl : text > </xsl : text ><xsl : value-of select =" $ImageFile_Path_and_ImageFile" />.<xsl : value-of select =" $ImageFile_format" /><xsl : text ></xsl : text >
69
+ </xsl : if >
66
70
</xsl : attribute >
67
71
<xsl : apply-templates select =" ns0:block|ns1:block|ns2:block|ns3:block" />
68
72
</div >
0 commit comments