Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Programmatic Alteration of Internal DTD Subset

From: Mukul Gandhi <mukul_gandhi@-----.--->
To: NULL
Date: 10/11/2008 9:30:00 AM
I explored the similar issue some time back.

You could look at my findings at,

http://gandhimukul.tripod.com/xml/xml.html

Please see, item no, 6.

Regards,
Mukul

On Oct 10, 10:56=A0am, Chris W <chrisw_j...@yahoo.com.au> wrote:
> Hi All,
>
> I have hundreds of small XML files of the form (extrabeous stuff removed)=
:
>
> <?xml version=3D"1.0"?>
> <!DOCTYPE page PUBLIC "-//LOCAL//DTD PAGE 0.1//EN" "page.dtd">
> <page>
> =A0 <graphic boardno=3D"entityname1" />
> =A0 <graphic boardno=3D"entityname2" />
> </page>
>
> that I would like to process into this form:
>
> <?xml version=3D"1.0"?>
> <!DOCTYPE page [
> =A0 =A0 =A0 =A0 <!ENTITY =A0entityname1 SYSTEM "entityname1.gif" NDATA gi=
f>
> =A0 =A0 =A0 =A0 <!ENTITY =A0entityname2 SYSTEM "entityname2.gif" NDATA gi=
f>
> =A0 =A0 =A0 =A0 <!NOTATION gif SYSTEM "image/gif">
> ]>
> <page>
> =A0 <graphic boardno=3D"entityname1" />
> =A0 <graphic boardno=3D"entityname2" />
> </page>
>
> That is, I'd like to load each file, find all the boardno attributes,
> insert an ENTITY declaration, insert a NOTATION declaration, and write
> the result to a file. =A0The XML markup is unchanged, just the internal
> DTD is altered. =A0Finding the boardno attributes in a DOM is trivial, bu=
t
> manipulating the internal DTD subset and getting it to file is eluding me=
.
>
> Apart from doing the DTD manipulation as a text file, any suggested tool
> sets/approaches. =A0Perl, Python, Java, whatever.
>
> Regards,
> Chris W


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent