[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
special characters within formated text
From: Alasdair Hatfield ####@####.#### Date: 15 Oct 2003 07:19:12 -0000 Message-Id: <200310150718.h9F7Itt12686@foureyes.embedded-designs.co.uk> Hi I have some code of the form <example id="hooks.cpp"> <title>hooks.cpp</title> <programlisting> sys_bus = new CBus<MEMTYPE, ADDRTYPE> ( "SYS_BUS", 32, 8); </programlisting> </example> When I compile this using xsltproc, I get the following error: mem.xml:180: error: error parsing attribute name sys_bus = new CBus<MEMTYPE, ADDRTYPE> ( "SYS_BUS", 32, 8); ^ The arrow is to the comma between MEMTYPE and ADDRTYPE. It appears that this and other similar errors are caused by the parser recognising these as special characters. How can I, in the xml file, tell the compiler to ignore these so I can use formated text without limitations? Thanks in advance Alasdair | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: special characters within formated text
From: Tabatha Marshall ####@####.#### Date: 15 Oct 2003 09:35:14 -0000 Message-Id: <1066210689.23159.0.camel@mysticchild> The character entities you're looking for are at: http://www.docbook.org/tdg/en/html/iso-num.html Usage: #entity; Hope that helps out! Tabatha On Wed, 2003-10-15 at 01:22, Alasdair Hatfield wrote: > Hi > > I have some code of the form > > <example id="hooks.cpp"> > <title>hooks.cpp</title> > <programlisting> > sys_bus = new CBus<MEMTYPE, ADDRTYPE> ( "SYS_BUS", 32, 8); > </programlisting> > </example> > > When I compile this using xsltproc, I get the following error: > > mem.xml:180: error: error parsing attribute name > sys_bus = new CBus<MEMTYPE, ADDRTYPE> ( "SYS_BUS", 32, 8); > ^ > > The arrow is to the comma between MEMTYPE and ADDRTYPE. > > It appears that this and other similar errors are caused by the parser > recognising these as special characters. > > How can I, in the xml file, tell the compiler to ignore these so I can use > formated text without limitations? > > Thanks in advance > Alasdair > > ______________________ > http://lists.tldp.org/ -- Tabatha Marshall Web: www.merlinmonroe.com Linux Documentation Project Review Coordinator (http://www.tldp.org) Linux Counter Area Manager US:wa (http://counter.li.org) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: special characters within formated text
From: Tabatha Marshall ####@####.#### Date: 15 Oct 2003 09:39:29 -0000 Message-Id: <1066210946.23159.2.camel@mysticchild> Whoops, the usage should have read: &entity; :D On Wed, 2003-10-15 at 02:38, Tabatha Marshall wrote: > The character entities you're looking for are at: > http://www.docbook.org/tdg/en/html/iso-num.html > > Usage: #entity; > > Hope that helps out! > > Tabatha > > On Wed, 2003-10-15 at 01:22, Alasdair Hatfield wrote: > > Hi > > > > I have some code of the form > > > > <example id="hooks.cpp"> > > <title>hooks.cpp</title> > > <programlisting> > > sys_bus = new CBus<MEMTYPE, ADDRTYPE> ( "SYS_BUS", 32, 8); > > </programlisting> > > </example> > > > > When I compile this using xsltproc, I get the following error: > > > > mem.xml:180: error: error parsing attribute name > > sys_bus = new CBus<MEMTYPE, ADDRTYPE> ( "SYS_BUS", 32, 8); > > ^ > > > > The arrow is to the comma between MEMTYPE and ADDRTYPE. > > > > It appears that this and other similar errors are caused by the parser > > recognising these as special characters. > > > > How can I, in the xml file, tell the compiler to ignore these so I can use > > formated text without limitations? > > > > Thanks in advance > > Alasdair > > > > ______________________ > > http://lists.tldp.org/ -- Tabatha Marshall Web: www.merlinmonroe.com Linux Documentation Project Review Coordinator (http://www.tldp.org) Linux Counter Area Manager US:wa (http://counter.li.org) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: special characters within formated text
From: "John R. Daily" ####@####.#### Date: 16 Oct 2003 01:31:55 -0000 Message-Id: <200310160131.h9G1VrI5019336@ohsmtp02.ogw.rr.com> I believe you're looking for CDATA: <![CDATA[ ... ]]> CDATA allows you to use any special XML characters like < or > with impunity, with the obvious exception of the string "]]>" itself. So: <programlisting><![CDATA[ sys_bus = new CBus<MEMTYPE, ADDRTYPE> ( "SYS_BUS", 32, 8); ]]></programlisting> should work. -- John R. Daily <email><mailbox>john</mailbox><domain>geekhavoc.com</domain></email> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |