[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] about XML parameter Entities
Sorry correct one line, in step 2 the command line should be xsltproc --output test.html --stringparam profile.os "Linux" /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/profile-docbook.xsl test.xml > -----Original Message----- > From: Huang Hake-B20222 > Sent: Tuesday, June 08, 2010 10:54 AM > To: RQuadling@googlemail.com > Cc: docbook-apps@lists.oasis-open.org > Subject: RE: [docbook-apps] about XML parameter Entities > > Hi Richard, > > Thanks. > > Now I find in docbook 5 the solution should be > > 1. define a profile in your segment like > <sect1 os="Linux"></sect1> > 2. process the xml with > xsltproc --output test.html --stringparam profile.userlevel "Linux" > /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/profile-docbook.xsl > test.xml 3. using below to mute the Linux sect xsltproc --output > test.html --stringparam profile.os "NoLinux" > /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/profile-docbook.xsl > test.xml > > the "noLinux" can be any string other than Linux, which you define in the > sect. > > Regards, > > Hake > > -----Original Message----- > > From: Richard Quadling [mailto:rquadling@gmail.com] > > Sent: Monday, June 07, 2010 8:50 PM > > To: Huang Hake-B20222 > > Cc: docbook-apps@lists.oasis-open.org > > Subject: Re: [docbook-apps] about XML parameter Entities > > > > On 7 June 2010 04:38, Huang Hake-B20222 <B20222@freescale.com> wrote: > > > Hi, > > > > > > > > > > > > I am a newer to docbook, and I am using the parameter entity to > > > control my output contents. As I see from the document for sgml I > > > can > > do below: > > > > > > > > > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [ > > > > > > <!ENTITY % electronic.copy "INCLUDE"> > > > > > > ]]> > > > > > > > > > > > > ... > > > > > > > > > > > > <![ %electronic.copy [ > > > > > > This content should only appear in the electronic > > > > > > version of the document. > > > > > > ]]> > > > > > > > > > > > > But when I use them in xml as below is does not work, and reports > > > “parser error : StartTag: invalid element name“ > > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > > > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN" > > > "http://docbook.org/xml/5.0/dtd/docbook.dtd"[ > > > > > > <!ENTITY Intro SYSTEM "Intro.xml"> > > > > > > <!ENTITY Setup SYSTEM "Setup.xml"> > > > > > > <!ENTITY % SRS.output "INCLUDE"> > > > > > > ]> > > > > > > <book> > > > > > > <bookinfo> > > > > > > <copyright> > > > > > > <year>2010</year> > > > > > > </copyright> > > > > > > </bookinfo> > > > > > > <title> manual</title> > > > > > > <![ %SRS.output [ > > > > > > <para>help me</para> > > > > > > ]]> > > > > > > </book> > > > > > > > > > > > > Anyone can advise how to do it in xml rather than sgml? Thanks in > > advance. > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > Hake > > > > I'm not an expert but it would seem from > > http://www.xml.com/pub/a/98/08/xmlqna1.html#PARAMENT that "Parameter > > entities can't be used in the content of your document; they simply > > aren't recognized.". > > > > > > Richard. > > > > -- > > ----- > > Richard Quadling > > "Standing on the shoulders of some very clever giants!" > > EE : http://www.experts-exchange.com/M_248814.html > > EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp > > Zend Certified Engineer : > > http://zend.com/zce.php?c=ZEND002498&r=213474731 > > ZOPA : http://uk.zopa.com/member/RQuadling
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]