![]() |
|
|
|||||||
![]() |
XML - xerces: entity and doctype with DOMPrint |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 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!! __PPS__ |
|
|
|
|
#2 |
|
Posts: n/a
|
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. datamystic@gmail.com |
|
|
|
#3 |
|
Posts: n/a
|
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 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 __PPS__ |
|