Re: Unexpected results in attempting a patch

2010-09-25 Thread Yawar Amin
Hi Tom,

On 2010-09-25, at 17:04, Tom Bullock wrote:

> […]
> I used your xsltproc command in a terminal and it worked as you said. I say 
> that, based on my seeing the modules being generated as the command executed. 
> However, I have not been able to find the output_html directory.
> 
> The modules are listed in the ../guide/C directory. When I list that fully 
> and its parent directory fully, there is no directory named output_html. All 
> modules are intermingled with the xml modules in the ../guide/C directory.
> 
> What did I do wrong that the output_html directory did not get created?

Ah, do you mean that all the HTML files have been put into the guide/C/ 
directory, instead of going into output_html? In that case I think I know what 
happened: you probably missed the ending slash (/) at the end of the 
output_html/ in the command. Xsltproc and a few other Unix-type commands 
interpret the slash character to mean a directory, and its absence to mean that 
you’re specifying a file. Long story short, xsltproc thought you wanted all the 
generated HTML to go into a file called ‘output_html’, which didn’t make sense 
because it was generating a bunch of HTML files. So it just ignored that bit 
and happily put all the HTML files into the current folder.

Right now you can easily tuck all the HTML files neatly away:

mkdir output_html
mv *.html output_html

And to start browsing the generated HTML, open up output_html/index.html in 
your browser.

Regards,

Yawar



PGP.sig
Description: This is a digitally signed message part
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Unexpected results in attempting a patch

2010-09-25 Thread Tom Bullock

Hi Yawar,

On 09/20/2010 09:36 PM, Yawar Amin wrote:

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.


I used your xsltproc command in a terminal and it worked as you said. I 
say that, based on my seeing the modules being generated as the command 
executed. However, I have not been able to find the output_html directory.


The modules are listed in the ../guide/C directory. When I list that 
fully and its parent directory fully, there is no directory named 
output_html. All modules are intermingled with the xml modules in the 
../guide/C directory.


What did I do wrong that the output_html directory did not get created?

TIA

Tom

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


RE: Unexpected results in attempting a patch

2010-09-21 Thread Thomas Bullock
Yawar,

Thanks for the thoro reply re my 2 questions and the link to pipes and 
redirection.  That definitely helps.  

I will be implementing your commands to get the results we both expect.  Thanks 
for detailing the part of the process that I had not yet seen on the way to the 
patch!

Tom

> -Original Message-
> From: Yawar Amin [mailto:yawar.a...@gmail.com]
> Sent: Monday, September 20, 2010 9:36 PM
> To: Thomas Bullock
> Cc: gnucash-devel (gnucash-devel@gnucash.org)
> Subject: Re: Unexpected results in attempting a patch
> 
> Hi Tom,
> 
> On 2010-09-20, at 20:20, Tom Bullock wrote:
> 
> >> [...]
> >
> > Yawar,
> >
> > I got the " 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

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


RE: Unexpected results in attempting a patch

2010-09-21 Thread Thomas Bullock


> -Original Message-
> From: David Jensen [mailto:david.e.jen...@gmail.com]
> Sent: Monday, September 20, 2010 8:41 PM
> To: Thomas Bullock
> Cc: Yawar Amin; gnucash-devel (gnucash-devel@gnucash.org)
> Subject: Re: Unexpected results in attempting a patch
> 
> Tom,
> 
> 
> You don't pipe (|) to an output file, you redirect (>).  Pipes
> 'connect' the output of one program to the input of another, so you
> were trying to run the output from svn diff into a program patch1.
> You want > instead of | ("svn diff > patch1") to that you redirect the
> output to a file and not a program.
> 
> Regards,
> David

[] 
Thanks, David.  I appreciate the linux information.  Still have much to learn.

Tom
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Unexpected results in attempting a patch

2010-09-21 Thread Derek Atkins
Yawar Amin  writes:

> Ideally yes, but either I’m not too familiar with the autogen/configure/make 
> system or the makefile is broken:

[snip]

The process is:

./autogen.sh
./configure
make
make install

> And I don’t want to pull in libtool and maybe a bunch of other stuff
> just to do an XSL transform :-)
>
> Regards,
>
> Yawar

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   warl...@mit.eduPGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Unexpected results in attempting a patch

2010-09-21 Thread Yawar Amin

On 2010-09-21, at 02:41, Frank H. Ellenberger wrote:

> […]
> Shouldn't this stuff be done somewhere by "make & make install"?
> 
> Frank

Ideally yes, but either I’m not too familiar with the autogen/configure/make 
system or the makefile is broken:


$ ls
AUTHORS  HACKING~ autogen.sh   help 
xsl
COPYING-DOCS Makefile.am  configure.in omf.make
ChangeLogNEWS gnucash-docs.spec.in stylesheet
HACKING  README   guidexmldocs.make
$ make
make: *** No targets specified and no makefile found.  Stop.
$ ./autogen.sh 
+ set -e
+ PROJECT=gnucash-docs
+ DIE=0
+ : libtoolize
+ : aclocal
+ : autoheader
+ : automake
+ : autoconf
+ echo

+ echo 'You must have libtoolize installed to compile gnucash-docs.'
You must have libtoolize installed to compile gnucash-docs.
+ echo 'Get ftp://alpha.gnu.org/gnu/libtool-1.0h.tar.gz'
Get ftp://alpha.gnu.org/gnu/libtool-1.0h.tar.gz
+ echo '(or a newer version if it is available)'
(or a newer version if it is available)
+ DIE=1
+ test 1 -eq 1
+ exit 1
$ make -f xmldocs.make 
xmldocs.make:77: /omf.make: No such file or directory
xmldocs.make:78: *** missing separator.  Stop.
$


And I don’t want to pull in libtool and maybe a bunch of other stuff just to do 
an XSL transform :-)

Regards,

Yawar



PGP.sig
Description: This is a digitally signed message part
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Unexpected results in attempting a patch

2010-09-20 Thread Frank H. Ellenberger
Hi,

Am Dienstag, 21. September 2010 um 03:36:29 schrieb Yawar Amin:
> 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

Shouldn't this stuff be done somewhere by "make & make install"?

Frank
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Unexpected results in attempting a patch

2010-09-20 Thread Yawar Amin
Hi Tom,

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

>> […]
> 
> Yawar,
> 
> I got the " 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



PGP.sig
Description: This is a digitally signed message part
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Unexpected results in attempting a patch

2010-09-20 Thread David Jensen
Tom,

On Mon, Sep 20, 2010 at 8:20 PM, Tom Bullock  wrote:
>
SNIP
> 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?
>
> TIA
>
> Tom
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>


You don't pipe (|) to an output file, you redirect (>).  Pipes
'connect' the output of one program to the input of another, so you
were trying to run the output from svn diff into a program patch1.
You want > instead of | ("svn diff > patch1") to that you redirect the
output to a file and not a program.

Regards,
David
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Unexpected results in attempting a patch

2010-09-20 Thread Tom Bullock



2.  gnucash-guide.xml:293: element xref: validity error : IDREF attribute 
linkend references an
unknown ID "ch_oth_assets.xml"

I have listed ch_oth_assets.xml in gnucash-guide.xml both as  (given on line 19)  and also as&chapter16; (given on line 
284)
 

OK, this means that you’ve defined a system entity (basically, a file living on 
the disk) named ‘ch_oth_assets.xml’ and which can be referred to as 
‘chapter16’. What you can do with this is by writing

   &chapter16;

at a certain point in the documentation, you can make the XML processor read in 
the entire contents of the file at that point. And in fact this is how the 
documentation is put together for all chapters, if you look at the last part of 
the gnucash-guide.xml file.

But this won’t work with the  tag, because it uses a different way of 
referring to chapters.

What you would do is, in your ch_oth_assets.xml file, you would have something 
like

   
 Other Assets
 …
   

Then, anywhere else in the docs, you would be able to write something like

 of this Guide.
wa
The vital thing is that in the, ‘whatever’ must match 
the…. That way, the correct chapter number will be 
put in at that point:

   Chapter 16 of this guide.
   


Yawar,

I got the "errors when I ran the xmllint command.


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?


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?


TIA

Tom
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel