You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by AS...@desknetinc.com on 2002/08/12 21:53:52 UTC

DocumentType.getInternalSubset() returning null

Hello,

I am using Xerces 2.0.2 to import XML documents and then export them later.
I am finding that if I import a document with an internal subset, and try
later to get that internal subset using the getInternalSubset(), the
returned value is null.  I was originally using Xerces 2.0.0 when I first
saw this, so I upgraded to 2.0.2 after reading through the list archives,
thinking that might solve the problem.  However, I had no such luck.

Here's the DOCTYPE node of the file I am importing:
<!DOCTYPE
            config
            SYSTEM "http://localhost:82/cw-client/dtds/config.dtd"
            [
                  <!ENTITY general SYSTEM "general.xml">
                  <!ENTITY mainPane SYSTEM "mainPane.xml">
                  <!ENTITY searches SYSTEM "searches.xml">
            ]
>

Here's what it looks like when I export it:
<!DOCTYPE config SYSTEM "http://localhost:82/cw-client/dtds/config.dtd">

As you can see, the getSystemId() call works just fine, but
getInternalSubset seems to fail.  Any thoughts?  Do I need to have any
particular features set?  Here are the ones I am setting:
                  parser.setFeature
("http://xml.org/sax/features/validation", validate);
                  parser.setFeature
("http://apache.org/xml/features/nonvalidating/load-external-dtd",
validate);
                  parser.setFeature
("http://apache.org/xml/features/validation/schema", validate);
                  parser.setFeature
("http://xml.org/sax/features/external-general-entities", expand);
                  parser.setFeature
("http://xml.org/sax/features/external-parameter-entities", expand);
                  parser.setFeature
("http://apache.org/xml/features/dom/create-entity-ref-nodes", !expand);

where validate == false and expand == true (for this particular case).

Any help would be greatly appreciated.

______________________________________
Aaron Scifres
Software Engineer
DeskNet, Inc.
66 Pearl St. Suite 300
Portland, ME 04101
(207) 772-1484 x16
http://www.desknetinc.com
DeskNetAPS - Harness the Power of Your Content


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org