This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] <programlisting> escape sequences and error: detected an error in element


Here's what I got ...

bash-2.05b$ xsltproc --version
Using libxml 20504, libxslt 10027 and libexslt 718
xsltproc was compiled against libxml 20504, libxslt
10027 and libexslt 718
libxslt 10027 was compiled against libxml 20504
libexslt 718 was compiled against libxml 20504

... so I track down a new version of xsltproc.

Thanks!

--- Michael Smith <smith@xml-doc.org> wrote:

> As far as I can see, it's not a problem with your
> document. It's
> well-formed XML and valid DocBook.
> 
> I tried running it through xsltproc, but couldn't
> reproduce those
> errors -- it generates HTML without any problems -
> 
>   http://docbook.sourceforge.net/tmp/example.html
> 
> Maybe it's the version of xsltproc you're using.
> Running 
> 'xsltproc --version' on the machine where I tested
> says -
> 
>   xsltproc was compiled against libxml 20604,
> libxslt 10102 and libexslt 802
> 
> So if 'xsltproc --version' on your machine tells you
> it's linking to a
> libxml older than 20604, you might want to try
> installing the latest
> libxml2/libxslt/xsltproc that you can find, and
> retry your test.
> 
> You might also try running it through another XSLT
> engine. Do you have
> Saxon?
> 
> Sheldon Plankton <sheldonplankton@yahoo.com> writes:
> 
> > Hi,
> > 
> > I am having problems with <programlisting> docbook
> tag
> > I think.  I want to list a shell script that makes
> use
> > of escape sequences to do fancy color stuff on the
> > terminal.   Yes I know that's a bad idea ... but
> it
> > ain't my script I just need to document it :)
> > 
> > Here's is a short example of what I am doing ....
> > 
> > 
> > 
> > bash-2.05b$ xsltproc -o example.html ../notes.xsl
> > example.xml
> > example.xml:18: error: detected an error in
> element
> > content
> >         print "Enter your encryption password?n"
> >         ^
> > example.xml:18: error: Premature end of data in
> tag
> > programlisting
> >         print "Enter your encryption password?n"
> >         ^
> > example.xml:18: error: detected an error in
> element
> > content
> >         print "Enter your encryption password?n"
> >         ^
> > example.xml:18: error: Premature end of data in
> tag
> > para
> >         print "Enter your encryption password?n"
> >         ^
> > example.xml:18: error: detected an error in
> element
> > content
> >         print "Enter your encryption password?n"
> >         ^
> > example.xml:18: error: Premature end of data in
> tag
> > sect1
> >         print "Enter your encryption password?n"
> >         ^
> > example.xml:18: error: detected an error in
> element
> > content
> >         print "Enter your encryption password?n"
> >         ^
> > example.xml:18: error: Premature end of data in
> tag
> > article
> >         print "Enter your encryption password?n"
> >         ^
> > example.xml:18: error: Extra content at the end of
> the
> > document
> >         print "Enter your encryption password?n"
> >         ^
> > unable to parse example.xml
> > 
> > Here's what I have in example.xml ...
> > 
> > <?xml version="1.0"?>
> > <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook
> XML
> > V4.1.2//EN"
> >
>
"/usr/share/sgml/docbook/xml-dtd-4.2-1.0-17/docbookx.dtd">
> > <article>
> >         <articleinfo>
> >                 <title>Example</title>
> >         </articleinfo>
> >         <sect1> <title>Example</title> <para>
> >                         <programlisting>
> >                                                   
>    
> >                                                   
>    
> >                                                   
>    
> >                     
> > WhichEncryptCipher () {
> > #######################
> > ENC_PROG_CIPHER=`cat /etc/recovery/EncryptedWith`
> > if [ -z "${ENC_PROG_CIPHER}" ]; then
> >         ENC_PROG_PASSWD=""
> >         ENC_PROG="cat"
> > else
> >         print "^[[1;33mEnter your encryption
> > password^[[36m?n"
> >         stty -echo &lt; `tty`
> >         read passwd &lt; `tty`
> >         stty echo &lt; `tty`
> >         #ENC_PROG_PASSWD="-pass pass:${passwd}"
> >         touch /tmp/.key
> >         chmod 600 /tmp/.key
> >         echo ${passwd} > /tmp/.key
> >         ENC_PROG_PASSWD="-kfile /tmp/.key"
> >         ENC_PROG="openssl"
> > fi
> > }
> > #-----&lt;--------->-------
> >                         </programlisting>
> >                 </para>
> >         </sect1>
> > </article>
> > bash-2.05b$
> > 
> > Also the &lt; are mine shouldn;t the
> programlisting
> > tag be able to deal with <'s ???
> > 
> > Thanks
> > Sheldon :)
> 

> ATTACHMENT part 2 application/pgp-signature 



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]