Dave Gash wrote: > > First, a big THANK YOU for your prompt and accurate reply to my toc page > number question! I did not realize that the generated toc was actually a > field, so Ctrl-A followed by F9 of course does the trick. Excellent! > > I am having one other problem I would like to ask you about. I am trying > to put an image (corporate logo) on the title page. To that end, I have > (1) created a custom style sheet importing the standard one, (2) > specified the -t ...\custom_fo.xsl option in my options file, (3) > Modified ditac_titlepage.xsl to call a named template in my > custom_fo.xsl, and (4) Added the named template with the logo reference > to custom_fo.xsl, thus: > > <!-- dag Add logo --> > <xsl:template name="dag_add_logo"> > <fo:block margin-top="500px"> > <fo:external-graphic > src="url(file:'C:\Downloads\DITA\XMLMindDitaConverter\ditac-2_0_0\_batfiles\i_certonalogo.png')"/> > </fo:block> > </xsl:template> > Interestingly, this all works -- to a point. The named template is > called and runs when it should, and the external-graphic element finds > the fully-pathed image file, but I get this error during the build: > > ditac: ERROR: warning: failed to load image > "file:'C:/Downloads/DITA/XMLMindDitaConverter/ditac-2_0_0/_batfiles/i_certonalogo.png'": > 'image/png'', unsupported graphic format > (file:/C:/dag/Certona/ImplInst/ditac_out/cmdlinetest.fo, line #1, column > #14088)
This error message is incorrect. > > The logo is an ordinary .png image, so I don't understand why it causes > an "unsupported graphic format" error. (Of course, I tried .gif, .jpg, > and .bmp versions as well, all with the same results.) Because this is > just a warning, the .docx document is generated and a placeholder is > inserted where the graphic should be, so I know it's "mostly working." :-) > > Can you point me in the right direction to resolve this error? > This URL is, well, not an URL at all: url(file:'C:\Downloads\DITA\XMLMindDitaConverter\ditac-2_0_0\_batfiles\i_certonalogo.png') I mean, just wrapping "url(file:" and ")" around an quoted XSL string which represents an absolute file path simply won't make it. Please retry after replacing it with: url(file:/C:/Downloads/DITA/XMLMindDitaConverter/ditac-2_0_0/_batfiles/i_certonalogo.png) Other example: quoted XSL string representing absolute file path: 'C:\My Folder\My Doc.dita' becomes URL: url(file:/C:/My%20Folder/My%20Doc.dita) Notice: no quotes, no backslashes, no space characters in filenames, etc. -- XMLmind FO Converter Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xfc-support

