Go Back   Velocity Reviews > Newsgroups > XML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

XML - xerces: entity and doctype with DOMPrint

 
Thread Tools Search this Thread
Old 09-26-2005, 08:39 PM   #1
Default xerces: entity and doctype with DOMPrint


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!!



__PPS__
  Reply With Quote
Old 09-26-2005, 11:58 PM   #2
datamystic@gmail.com
 
Posts: n/a
Default Re: xerces: entity and doctype with DOMPrint
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
  Reply With Quote
Old 09-27-2005, 12:47 AM   #3
__PPS__
 
Posts: n/a
Default Re: xerces: entity and doctype with DOMPrint
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



__PPS__
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46