Unexpected results in attempting a patch

Yawar Amin yawar.amin at gmail.com
Mon Sep 20 21:36:29 EDT 2010


Hi Tom,

On 2010-09-20, at 20:20, Tom Bullock wrote:

>> […]
> 
> Yawar,
> 
> I got the "<xref linkend" tag to work! Proof was that there were no errors when I ran the xmllint command.

Good stuff. You’re almost there.

> Question 1:
> 
> When I wanted to view the files in my Firefox browser I got this for the chapter named ch_accts.xml:
> 
> XML Parsing Error: undefined entity
> Location: file:///home/tbullock/gc-docs-090510/guide/C/ch_accts.xml
> Line Number 20, Column 19:
> 
> accounts. Since &app; does not impose any specific account tree layout,
> ------------------^
> 
> Why does it view the symbolic parameter as an entity? How have you made the browser resolve the parameter making symbolic substitution? Do you have a script that does that prior to browser display?

You’re right that there is actually a program that transforms our source XML files into browser-friendly HTML. I don’t have a script per se, I just run the command directly (the following assumes you’re in the guide/whatever-locale/ directory, e.g. guide/C/):

xsltproc -o output_html/ ../../xsl/general-customization.xsl gnucash-guide.xml

A little explanation: output_html is a directory that will automatically be created and filled with the output HTML. You can specify any name that makes sense. ../../xsl/general-customization.xsl is a relative path to the XSL stylesheet we are using to turn the raw input XML into the HTML we want, and it has to be that exact name.

At this point, the generated HTML guide will be in the output_html directory, and you can open any of the files in there with your browser. But the problem is you won’t be able to see any images–screenshots, icons, etc. If that’s OK, you can ignore the next bit. If not, a quick fix is to run:

cd output_html
ln -s ../figures
ln -s ../../../stylesheet

Now if you reload any page where you didn’t see any image before, it will appear now.

Note that when you’re ready to prepare your patch, you don’t want the output_html directory to be mentioned anywhere in it, so delete it before doing the patch:

rm -rf output_html

> Question 2:
> 
> I ran "svn diff" in a terminal and the result showed what I was expecting.  I then wanted to capture the output into a file to attach to a bugzilla bug report.  I used this command:
> "svn diff | patch1" thinking I was going to pipe the output into the file called patch1.  Instead I got this response:
> 
> No command 'patch1' found, did you mean Command 'patch' from package 'patch' (main)
> 
> obviously, I am misleading ubuntu 10.4 and don't know how to pipe output into a new file. What should I be doing?

As David Jensen said, it’s the difference between Unix piping and redirection. A bunch of sites explain pipes et al., but a quick Google search turns up: http://polishlinux.org/console/unix-pipes-streams-and-redirections-explained/ Piping/redirecting is one of those things that can be very useful in Windows too from time to time.

HTH,

Yawar

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100920/ca6cc594/attachment.bin>


More information about the gnucash-devel mailing list