473,509 Members | 10,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Attributes with quotes within entities

Hi,

I'm writing some DocBook with lots of math formulae. For every
mathematical expression in my document, I have to enclose it in :

<math xmlns="http://www.w3.org/1998/Math/MathML">
blah
</math>

so I thought of declaring entities in the DTD extension so I can just use

&mathbegin;
blah
&mathend

Problem is, how do I declare there ?

<!ENTITY mathbegin <math xmlns="http://www.w3.org/1998/Math/MathML">>

<!ENTITY mathbegin '<math xmlns="http://www.w3.org/1998/Math/MathML">'>

<!ENTITY mathbegin "<math xmlns='http://www.w3.org/1998/Math/MathML'>">

<!ENTITY mathbegin "<math xmlns="http://www.w3.org/1998/Math/MathML">">

<!ENTITY mathbegin "<math
xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;>">

all don't work (with Xalan). The problem seems to be the quotes in the
text I want to declare an entity for ...

Surely there must be a solution ...

Soren
Jul 20 '05 #1
1 1428
In article <F1**********************@news000.worldonline.dk >,
Soren Kuula <do************@bitplanet.net> wrote:
&mathbegin;
blah
&mathend
Sorry, you can't do that: elements must start and end in the same entity.

But you can shorten it:
<math xmlns="http://www.w3.org/1998/Math/MathML">
blah
</math>


Declare a fixed attribute for the <math> element:

<!ATTLIST math xmlns CDATA #FIXED "http://www.w3.org/1998/Math/MathML">

and then you can just use

<math>
blah
</math>

-- Richard
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1792
by: Ken Fine | last post by:
I'm using XMLHTTP to screen-scrape many thousands of pages of content as part of a data-structuring project. One issue that I'm running into is that some entities such as curly quotes and curly...
3
4344
by: Kunle Odutola | last post by:
I have a database that tracks players for children's sports clubs. I have included representative DDL for this database at the end of this post. A single instance of this database supports...
1
2702
by: John L. Clark | last post by:
I am curious as to the rationale, and effect, of having default namespaces not applying (directly) to attributes (see http://www.w3.org/TR/REC-xml-names/#defaulting). Given an attribute without a...
3
1722
by: Rohit Sharma | last post by:
Hi all.. ..NET + MSXML platform....VB Need to build a list of all the entities and attributes to allow the user to do search...how can i do that from the schema ?? Cheers Rohit
23
5762
by: Haines Brown | last post by:
I tried changing font-family from helvetica to arial and discovered that I loose typographic quotes, etc. (for example, if I have “ in a page, the double opening quotation mark is not curly). ...
3
2003
by: apiringmvp | last post by:
All, So I am creating a function that gets a short blurb of html from a blog. I would like to retain all html formating and images. The code below works well, with the exception of one issue....
4
3196
by: ChillyRoll | last post by:
Hello guys, I am looking for a parser in PHP that can return all the attributes of XML entities. I know how to read the XML Entities, but I have got a problem with reading attributes. So I will...
5
2634
by: A.Martini | last post by:
Hello, I have to parse an xml file which has entities like &8220; ” and apostrophes ('). I have created a parser and I parse the xml but the xml_parse function convert entities and apostrophes to...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7347
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7073
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5062
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.