xerces: entity and doctype with DOMPrint

__PPS__

Usenet Archive
Joined
Jul 9, 2004
Messages
106
Reaction score
0
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 &copy; with '©', &nbsp; with ' ' for xhtml documents, but I want it not to replace &nbsp; 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 "&nbsp;" text :), but it results in error: circular expansion. Is there a way to to make &nbsp; replaced by &nbsp;? 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!!
 

datamystic

Usenet Archive
Joined
Sep 15, 2005
Messages
2
Reaction score
0
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.
 

__PPS__

Usenet Archive
Joined
Jul 9, 2004
Messages
106
Reaction score
0
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

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,244
Members
248,133
Latest member
DujonT

Latest Threads

Top