xerces: entity and doctype with DOMPrint

P

__PPS__

Hello everybody,
I use xerces for cpp and I'm tring to adapt domprint for my own needs.
What I cannot find how to do is how can I preserve certain enteties.
For example, if domprint run without "-e" then it substitutes ©
with '©',   with ' ' for xhtml documents, but I want it not to
replace   cause it will change xhtml documents. (If I use -e
domprint leaves oll the entities, but that's not what I need). First I
tried to redeclare entity nbsp inside inline doctype declareation so
that it would be replaced with " " text :), but it results in
error: circular expansion. Is there a way to to make   replaced by
 ?
Second thing, I use custom dtd for my documents and my modified
DOMPrint does some small transformations on the input document, then I
need to replace <!DOCTYPE ...> element with something different, is
there any other way to do this other than simple search/replace in
resulting output document?? What I'd really like to do is to declare
some entity in my custom dtd that holds proper dtd declaration for
transformed document (I have a few custom dtd's and each of them
corresponds to some other dtd)

Thanks alot!!
 
D

datamystic

Hmmm. If you have a lot of XML to modify, I'd use TextPipe Pro
(www.datamystic.com). It has a lot of neat XML and HTML restrictions
that can be embedded inside each other, so you could restrict your
change to just the DTD.
 
P

__PPS__

Basicly, I solved the problem with replaced dtd - now I use from the
beginning the dtd that's expected to come at the end and I use
XMLEntityResolver to redirect external entities for certain dtd's;
The problem with &nbsp; seems to be the only problem I cannot solve at
the moment
is there anyone who is familiar with xerces?? how can I do that??

thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top