Adding DTD reference in xml

hi,
      This way i am creating xml,
        var cAcrobat += "<Root>";
        cAcrobat += "<Sample>" + "Something" + "</Sample>";
        cAcrobat += "</Root>";
        this.createDataObject("Acrobat.xml", cAcrobat);
        var Acrobat = this.getDataObjectContents("Acrobat.xml");
        cAcrobat = util.stringFromStream(Acrobat,  "utf-8");
        var myXML = XMLData.parse(cAcrobat, false);
        var cAcrobat = myXML.saveXML('pretty');
        var Acrobat = util.streamFromString(cAcrobat, "utf-8");
        this.setDataObjectContents("Acrobat.xml", Acrobat);
and as a result it is creating an xml file as an attachment to pdf,  as follows,
  <?xml version="1.0" encoding="UTF-8" ?>
- <xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
- <Root>
  <Sample>Something</Sample>
  </Root>
  </xfa:data>
but i want to add DTD reference to xml file before the Root node  and after adding it should create xml like this,
<?xml version="1.0" encoding="UTF-8" ?>
"<!DOCTYPE  Some-application SYSTEM 'file:C:/SomeFolder/Test.dtd'>";
- <xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
- <Root>
  <Sample>Something</Sample>
  </Root>
  </xfa:data>
please tell me how to add this dtd reference in xml file, and whater i am doing above is correct or not?
please tell me how to add dtd reference in xml file.

I already created xml file as an attachment to pdf as explained in my 1st post.  now my problem is
How to add DTD syntax line into XML using acrobat java script or E4X objects(?). like the one below
<DOCTYPE SomeApp:MyformData SYSTEM "C:/myreference.dtd">

Similar Messages

  • Dom can't parse dtd reference in xml file

    Hi all,
    I am trying to parse a xml file (hibernate mapping file *.hbm.xml) using DOM. But itis getting timeout errorwhile parsing due to the external dtd reference in the xml file.
    <!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >I understand that the program is trying to access the document and is not being able to do so. But I don't have any clue to solve this problem. I don't want to remove the reference from the xml file.
    The following method is trying to parse the xml file:
    public void parseXML(String file) {
            factory = DocumentBuilderFactory.newInstance();
            System.out.println(file);
             try {
                 builder = factory.newDocumentBuilder();
                 document = builder.parse(file);
                 Element docEle = document.getDocumentElement();
                 NodeList n1 = docEle.getElementsByTagName("class");
                for(int i = 0; i < n1.getLength(); i++) {
                       Element e1 = (Element) n1.item(i);
                       String nm = e1.getAttribute("name");
                     System.out.println(nm);
            } catch(Exception e) {
                throw new RuntimeException(e);
        }Please help me on this....I am at no end....Please let me know if there is any method so that the parser will overlook this reference and will parse the xml file....or any other sort of solution....
    Thanks in advance...
    Anir

    Can you provide a working sample?  Upload to Onedrive and share it with us.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • Overriding the DTD reference in XML

    Hi
    I have an xml file which references a dtd within the DOCType tag. The problem I have is that currently the reference is as follows:
    file:///D:/castor/castor-0.9.3.21/castor-0.9.3.21/doc/mapping.dtd
    which makes it specific to my machine. This file along with many others is packaged into a jar and deployed on a application server. Does anyone know how to make the dtd referrence more generic. i.e how can i reference a dtd which is in the jar file which is deployed to the server.
    Currently i think weblogic does this in the deployment descriptors because it references a dtd on the web but gets one locally.
    Has anybody got any ideas
    All helpis greatly appreciated
    Thanks

    i dunno if there is a generic way of writing a SYSTEM uri that would look into a jar, so:
    * using DOM, I would create my own EntityResolver that would point the parser to the DTD located in the jar.
    * using SAX, I would do the same in the resolveEntity() method of my handler.

  • XSD/DTD Reference in XML ISSUE

    Hi,
    What I am trying to do. Lets say that I have an XML file on a machine locally, and I want to
    parse that XML file and validate it against a XSD that is determined dynamically or
    at runtime. What I am saying is that I have an XML file that may or may
    not have a schema reference inside its top root node, but either way what I am looking to do is
    to take this loaded XML file and set an XSD reference and then validate the XML file
    against that XSD file ?
    Even if I don't have to set the XSD reference within the XML file itself, I still need to validate it against
    a XSD that will be choosen at runtime.
    Any ideas out there ?
    Thanks,
    Wesley C. Maness
    [email protected]

    Thanks, for that but here is a continuation of the problem...
    </MISSION_MODE_FRAME>
    </MISSION_MODE>
    Error while loading mission mode MissionModeComposer.xml:
    no protocol: <?xml version="1.0" encoding="UTF-8"?>
    <!--
            XML file used in loading Composer as a mode.
    --><MISSION_MODE name="MissionModeComposer" resolution="1600x1200" swap="off" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\CMMU
    \SRC\data\modes\MM_XSD.xsd">
      <MISSION_MODE_FRAME className="missionMode.renderer.ChartFrameRenderer" height="590" main="true" scalable="true" title="MissionModeComposer" width="650" x="540" y="406"
    >
      <MISSION_MODE_VWS className="missionMode.renderer.ChartPanelVWSRenderer" height="0" name="chartPanel" swap="true" swapHandleColor="" width="0" x="566" y="566">
        <MISSION_MODE_COMPONENT Default="true" componentClassName="chartPanel" description="hey" maintainDisplayState="false" rendererClassName="null" resize="false" showImme
    diately="true">
        </MISSION_MODE_COMPONENT>
      </MISSION_MODE_VWS>What would cause the error seen above ?
    Wesley

  • DTD + Schema reference in xml file to be inserted

    Hi,
    I am pasting sample code where I want to have schema + DTD reference. Schema file is used for validating the file and DTD is needed for entity resolution.
    <?xml version="1.0" ?>
    <!DOCTYPE html [
    <!ENTITY reg    "®">
    ]>
    <html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.xsd">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
    </head>
    <!-- class="header" -->
    <body>
    Hi all. Register symbol should be displayed now &reg;
    </body>
    </html>I have already registered http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.xsd schema with the DB. But, when I try to insert this xml data in the DB, I'm getting the following error.
    SQL Error: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00104: Warning: element "html" is not declared in the DTD
    Error at line 5
    ORA-06512: at "SYS.XMLTYPE", line 296
    ORA-06512: at line 1
    31011. 00000 -  "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.Anyone please help me in resolving this issue..
    Thanks in advance,
    Divya.
    Edited by: user11853430 on Nov 28, 2010 8:45 PM

    Thanks for the information. I assume you are intending using Schema Based Binary XML storage. Attempting to use Object Realtional storage for XHTML is not something we would recommend. I am checking with development to see if we have a way of using the DTD just for entity resolution. In the mean time the only other solution I can think of it to include the full or partial DTD for XHTML in addition to the entity defintion..
    I tried this, but it doesn't seem to work
    SQL> select XMLTYPE(
      2  '<?xml version="1.0" ?>
      3  <!DOCTYPE html [
      4  <!ENTITY reg    "r">
      5  <!ELEMENT html ANY>
      6  ]>
      7  <html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.xsd">
      8    <head>
      9      <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
    10      <meta http-equiv="Content-Style-Type" content="text/css" />
    11      <meta http-equiv="Content-Script-Type" content="text/javascript" />
    12    </head>
    13
    14  <!-- class="header" -->
    15    <body>
    16      Hi all. Register symbol should be displayed now &reg;
    17     </body>
    18  </html>') from dual
    19  /
    ERROR:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00106: Warning: attribute "xmlns:xsi" of element "html" is undefined
    Error at line 6
    ORA-06512: at "SYS.XMLTYPE", line 310
    ORA-06512: at line 1
    no rows selectedWhat you want is the DTD equivilant of
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="html" type="xs:anyType">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
         </xs:element>
    </xs:schema>I also tried making the xhtml-strict DTD available... but that did not appear to work
    First load the DTD and ENT files into the repository.
    C:\xdb\examples\DTD>sqlplus /nolog @loadDTD %CD%
    SQL*Plus: Release 11.2.0.2.0 Production on Sat Nov 27 10:55:32 2010
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    SQL> spool loadDTD.log
    SQL> --
    SQL> connect system/oracle
    Connected.
    SQL> --
    SQL> create or replace directory XMLDIR as '&1'
      2  /
    old   1: create or replace directory XMLDIR as '&1'
    new   1: create or replace directory XMLDIR as 'C:\xdb\examples\DTD'
    Directory created.
    SQL> --
    SQL> declare
      2    V_RESULT             BOOLEAN;
      3    V_DTD_FOLDER         VARCHAR2(700) := '/sys/DTD';
      4    V_DTD_TRANSITIONAL   VARCHAR2(700) := '/sys/DTD/xhtml1-transitional.dtd';
      5    V_DTD_STRICT         VARCHAR2(700) := '/sys/DTD/xhtml1-strict.dtd';
      6    V_DTD_STRICT_REG     VARCHAR2(700) := '/sys/DTD/xhtml1-strict+reg.dtd';
      7    V_ENT_LAT1           VARCHAR2(700) := '/sys/DTD/xhtml-lat1.ent';
      8    V_ENT_SYMBOL         VARCHAR2(700) := '/sys/DTD/xhtml-symbol.ent';
      9    V_ENT_SPECIAL        VARCHAR2(700) := '/sys/DTD/xhtml-special.ent';
    10  begin
    11    if (not DBMS_XDB.existsResource(V_DTD_FOLDER)) then
    12      V_RESULT := DBMS_XDB.createFolder(V_DTD_FOLDER);
    13    end if;
    14    if (not DBMS_XDB.existsResource(V_DTD_TRANSITIONAL)) then
    15      V_RESULT := DBMS_XDB.createResource(V_DTD_TRANSITIONAL,bfilename('XMLDI
    R','xhtml1-transitional.dtd'));
    16    end if;
    17    if (not DBMS_XDB.existsResource(V_DTD_STRICT)) then
    18      V_RESULT := DBMS_XDB.createResource(V_DTD_STRICT,bfilename('XMLDIR','xh
    tml1-strict.dtd'));
    19    end if;
    20    if (not DBMS_XDB.existsResource(V_DTD_STRICT_REG)) then
    21      V_RESULT := DBMS_XDB.createResource(V_DTD_STRICT_REG,bfilename('XMLDIR'
    ,'xhtml1-strict+reg.dtd'));
    22    end if;
    23    if (not DBMS_XDB.existsResource(V_ENT_LAT1)) then
    24      V_RESULT := DBMS_XDB.createResource(V_ENT_LAT1,bfilename('XMLDIR','xhtm
    l-lat1.ent'));
    25    end if;
    26    if (not DBMS_XDB.existsResource(V_ENT_SYMBOL)) then
    27      V_RESULT := DBMS_XDB.createResource(V_ENT_SYMBOL,bfilename('XMLDIR','xh
    tml-symbol.ent'));
    28    end if;
    29    if (not DBMS_XDB.existsResource(V_ENT_SPECIAL)) then
    30      V_RESULT := DBMS_XDB.createResource(V_ENT_SPECIAL,bfilename('XMLDIR','x
    html-special.ent'));
    31    end if;
    32    commit;
    33  end;
    34  /
    PL/SQL procedure successfully completed.
    SQL> select ANY_PATH
      2    from RESOURCE_VIEW
      3   where under_path(RES,'/sys/DTD') = 1
      4  /
    ANY_PATH
    /sys/DTD/xhtml-lat1.ent
    /sys/DTD/xhtml-special.ent
    /sys/DTD/xhtml-symbol.ent
    /sys/DTD/xhtml1-special.ent
    /sys/DTD/xhtml1-strict+reg.dtd
    /sys/DTD/xhtml1-strict.dtd
    /sys/DTD/xhtml1-symbol.ent
    /sys/DTD/xhtml1-transitional.dtd
    8 rows selected.
    SQL> quit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64
    bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    C:\xdb\examples\DTD>However even after adding the references to the XML document
    SQL> select XMLTYPE(
      2  '<?xml version="1.0" ?>
      3  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      4          "/sys/DTD/xhtml1-strict+reg.dtd">
      5  <html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.xsd">
      6    <head>
      7      <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
      8      <meta http-equiv="Content-Style-Type" content="text/css" />
      9      <meta http-equiv="Content-Script-Type" content="text/javascript" />
    10    </head>
    11
    12  <!-- class="header" -->
    13    <body>
    14      Hi all. Register symbol should be displayed now &reg;
    15     </body>
    16  </html>') from dual
    17  /
    ERROR:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00217: invalid character 402 (U+0192)
    Error at line 3
    Error at line 34
    Error at line 25
    ORA-06512: at "SYS.XMLTYPE", line 310
    ORA-06512: at line 1
    no rows selected
    SQL>

  • Validate XML document (no DTD reference)

    Hi,
    I have two files: document.xml and rules.dtd. My "document.xml" does not reference "rules.dtd", but I would like to validate basead on this file. Is it possible?
    Is there a method like: boolean isValid(String xmlFile, String dtdFile) ?
    Thanks,
    Andr�

    Add a <!DOCTYPE root_element SYSTEM "dtdFile.dtd"> to the xml document.

  • Ignore DTD reference in message monitoring (SXMB_MONI)

    Hi All,
    My Inbound Message (to be delivered to the target system) needs to have DTD reference as the target system mandates it.
    In the mapping I have added the DTD Reference (<!DOCTYPE .../>).
    Although the target system is happy ,massage monitoring is complaining that the DTD is missing when I want to display the XML message.This is a support issue as the inbound XML message is not diaplayed  in SXMB_MONI.
    Is there any way to work around it - Configuration or putting the DTDs somewhere in XI server.
    Thanks in Advance,
    Bikram

    Rather than add the DTD reference in a message mapping, you could try add it in a Java module attached to the receiver/outbound module-chain of your target communication channel.  This way the DTD line would not get added until after the message has left the integration server.
    Check out the following guide:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
    Let me know how you get on.
    (+ please assign me some forum points if you found this useful).
    Thanks,
    Paul Digance.

  • How to add a DTD Reference to the payload ??

    Hi All,
    How to add a DTD Reference to the payload using graphical mapping ??
    For eg:
    Current Output
    ============
    <?xml version="1.0" encoding="UTF-8" ?>
    <dcsextractdata extractname="">
    <dataheaders>
    <dataheader>
    <record_type datatype="123" />
    <action datatype="CHAR">E</action>
    <code>FK</code>
    </dataheader>
    </dataheaders>
    </dcsextractdata>
    Required Output
    ============
    <?xml version="1.0" encoding="UTF-8" ?>
    <b><!DOCTYPE dcsextractdata SYSTEM "../lib/ftgppl.dtd"></b>
    <dcsextractdata extractname="">
    <dataheaders>
    <dataheader>
    <record_type datatype="123" />
    <action datatype="CHAR">E</action>
    <code>FK</code>
    </dataheader>
    </dataheaders>
    </dcsextractdata>
    Thanks in Advance
    Regards,
    Chemmanz

    Hi Chemmanz,
    your req of adding DTD ref cant be achieved by graphical mapping.......
    you can achieve your this req by making a J2EE adapter module and then deploying it in XI and then calling this module in your recever file comm channel...
    Thanks,
    Rajeev Gupta

  • Make DocumentBuilder.parse ignore DTD references

    Thanks to everyone in advance -
    So this issue looks to be pretty popular, I have found a few solutions, but nothing seems to stop the downloading of dtd files, for instance ones sitting up on w3.org.
    Here are some of the solutions i have found:
    http://stackoverflow.com/questions/155101/make-documentbuilder-parse-ignore-dtd-references
    http://forums.sun.com/thread.jspa?threadID=284209&forumID=34
    When I use this solution:
    myDocumentBuilder.setEntityResolver(new EntityResolver() {
              public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
                     throws SAXException, java.io.IOException
                if (publicId.equals("--myDTDpublicID--"))
                  // this deactivates the open office DTD
                  return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes()));
                else return null;
    });it still continues to download the dtd.
    Any suggestions?
    Thanks,
    Sam

                        MyDocumentBuilder.setEntityResolver(
                             new EntityResolver() {
                                  public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws SAXException, java.io.IOException {
                                       if(true){
                                            throw new IOException(publicId +"|"+ systemId);
                                       return null ;
                        );Good eye - It looks like that IOException is never being called - any suggestions?
    Thanks,
    Sam

  • Ignoring a DTD reference

    I'm trying to load an existing XML document that specifies the DTD as a relative reference:
    <!DOCTYPE Overlay SYSTEM "overlay.dtd" >
    When I have the DTD in the same directory as the XML file things work, when it's not there it fails with a file not found exception as expected:
    java.io.FileNotFoundException: C:\...\overlay.dtd (The system cannot find the file specified)
    However it still fails with that even when validation is disabled.
    Is there any way to have the parser completely ignore the DTD reference?

    I'd suggest you shouldn't be putting those DTD references in your XML if they aren't going to be used. However perhaps you could write your own EntityResolver that catches references to that DTD and replaces them with a reference to some other DTD... maybe a trivial one that does no validation.

  • XSDBuilder fails to resolve DTD references

    I am evaluating XDK 9.2.0.5.0 for Java and have encountered a problem
    with XML Schema support.
    I am using XSDBuilder to build an XMLSchema object from several .xsd
    files. The main .xsd file is secext.xsd, and this file imports other
    .xsd files. I assign an EntityResolver to the XSDBuilder so that all
    imported schema files will be read from my local file system, rather
    than being retrieved from the Internet.
    XSDBuilder does call my EntityResolver to resolve the import
    statements in the XML Schema files; however, it fails to call my
    EntityResolver to resolve XMLSchema.dtd reference in the DOCTYPE
    declaration of xml.xsd.
    I am using Oracle XDK version 9.2.0.5.0 on Solaris 8 with Java 1.4. I
    have also tried version 10.1.0.0.0 beta and received the same results.
    Here is the test case:
    Download the following files and save them in /tmp/xsd/.
    http://schemas.xmlsoap.org/ws/2002/04/secext/secext.xsd
    http://www.w3.org/2001/xml.xsd
    http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd
    http://www.w3.org/2001/XMLSchema.dtd
    Compile and run OracleSchemaTest.java, passing 'secext.xsd' as the
    command line arg.
    java dfranklin.OracleSchemaTest secext.xsd
    It produces the following output:
    resolveEntity: null, secext.xsd
    resolved to /tmp/xsd/secext.xsd
    resolveEntity: http://schemas.xmlsoap.org/ws/2002/04/secext, http://www.w3.org/2001/xml.xsd
    resolved to /tmp/xsd/xml.xsd
    <Line 2, Column 80>: XML-0112: (Fatal Error) Error opening external DTD 'XMLSchema.dtd'.
    Exception in thread "main" oracle.xml.parser.schema.XSDException: Error opening external DTD 'XMLSchema.dtd'.
    at oracle.xml.parser.schema.XSDBuilder.parseIncludeAndImport(XSDBuilder.java:814)
    at oracle.xml.parser.schema.XSDBuilder.parseTopLevelElem(XSDBuilder.java:662)
    at oracle.xml.parser.schema.XSDBuilder.buildSchema(XSDBuilder.java:486)
    at oracle.xml.parser.schema.XSDBuilder.build(XSDBuilder.java:304)
    at oracle.xml.parser.schema.XSDBuilder.build(XSDBuilder.java:249)
    at dfranklin.OracleSchemaTest.buildXMLSchema(OracleSchemaTest.java:48)
    at dfranklin.OracleSchemaTest.run(OracleSchemaTest.java:29)
    at dfranklin.OracleSchemaTest.main(OracleSchemaTest.java:23)
    The output shows that the EntityResolver is not being called to
    resolve 'XMLSchema.dtd'.
    === begin OracleSchemaTest.java ===
    package dfranklin;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.InputStream;
    import oracle.xml.parser.schema.XMLSchema;
    import oracle.xml.parser.schema.XSDBuilder;
    import oracle.xml.parser.schema.XSDException;
    import oracle.xml.parser.v2.XMLError;
    import org.xml.sax.InputSource;
    public class OracleSchemaTest
    implements org.xml.sax.EntityResolver
    private static String xsdstr;
    private static String basepath = "/tmp/xsd";
    public static void main(String[] args)
    throws Exception
    xsdstr = args[0];
    new OracleSchemaTest().run();
    public void run()
    throws Exception
    XMLSchema xmlSchema = buildXMLSchema(xsdstr);
    System.out.println("xmlSchema=" + xmlSchema);
    public XMLSchema buildXMLSchema(String systemId)
    throws Exception
    XSDBuilder xsdBuilder = new XSDBuilder();
    xsdBuilder.setEntityResolver(this);
    InputStream xsdin = null;
    InputSource insrc = resolveEntity(null, xsdstr);
    if (insrc != null) {
    xsdin = insrc.getByteStream();
    if (xsdin == null) {
    throw new IOException("Can't resolve entity " + xsdstr);
    XMLSchema xmlSchema = (XMLSchema)xsdBuilder.build(xsdin, null);
    return xmlSchema;
    public InputSource resolveEntity(String publicId, String systemId)
    throws
    org.xml.sax.SAXException,
    java.io.IOException
    System.err.println("resolveEntity: " + publicId + ", " + systemId);
    String fn;
    if ("http://www.w3.org/2001/xml.xsd".equals(systemId)) {
    fn = basepath + "/" + "xml.xsd";
    } else if ("http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd".equals(systemId)) {
    fn = basepath + "/" + "xmldsig-core-schema.xsd";
    } else if ("http://www.w3.org/2001/XMLSchema.dtd".equals(systemId)) {
    fn = basepath + "/" + "XMLSchema.dtd";
    } else {
    fn = basepath + "/" + systemId;
    try {
    InputStream in = new FileInputStream(fn);
    System.err.println("resolved to " + fn);
    InputSource insrc = new InputSource(in);
    insrc.setSystemId(systemId);
    return insrc;
    } catch (FileNotFoundException e) {
    return null;
    ==== end OracleSchemaTest.java ===

    I am evaluating XDK 9.2.0.5.0 for Java and have encountered a problem
    with XML Schema support.
    I am using XSDBuilder to build an XMLSchema object from several .xsd
    files. The main .xsd file is secext.xsd, and this file imports other
    .xsd files. I assign an EntityResolver to the XSDBuilder so that all
    imported schema files will be read from my local file system, rather
    than being retrieved from the Internet.
    XSDBuilder does call my EntityResolver to resolve the import
    statements in the XML Schema files; however, it fails to call my
    EntityResolver to resolve XMLSchema.dtd reference in the DOCTYPE
    declaration of xml.xsd.
    I am using Oracle XDK version 9.2.0.5.0 on Solaris 8 with Java 1.4. I
    have also tried version 10.1.0.0.0 beta and received the same results.
    Here is the test case:
    Download the following files and save them in /tmp/xsd/.
    http://schemas.xmlsoap.org/ws/2002/04/secext/secext.xsd
    http://www.w3.org/2001/xml.xsd
    http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd
    http://www.w3.org/2001/XMLSchema.dtd
    Compile and run OracleSchemaTest.java, passing 'secext.xsd' as the
    command line arg.
    java dfranklin.OracleSchemaTest secext.xsd
    It produces the following output:
    resolveEntity: null, secext.xsd
    resolved to /tmp/xsd/secext.xsd
    resolveEntity: http://schemas.xmlsoap.org/ws/2002/04/secext, http://www.w3.org/2001/xml.xsd
    resolved to /tmp/xsd/xml.xsd
    <Line 2, Column 80>: XML-0112: (Fatal Error) Error opening external DTD 'XMLSchema.dtd'.
    Exception in thread "main" oracle.xml.parser.schema.XSDException: Error opening external DTD 'XMLSchema.dtd'.
    at oracle.xml.parser.schema.XSDBuilder.parseIncludeAndImport(XSDBuilder.java:814)
    at oracle.xml.parser.schema.XSDBuilder.parseTopLevelElem(XSDBuilder.java:662)
    at oracle.xml.parser.schema.XSDBuilder.buildSchema(XSDBuilder.java:486)
    at oracle.xml.parser.schema.XSDBuilder.build(XSDBuilder.java:304)
    at oracle.xml.parser.schema.XSDBuilder.build(XSDBuilder.java:249)
    at dfranklin.OracleSchemaTest.buildXMLSchema(OracleSchemaTest.java:48)
    at dfranklin.OracleSchemaTest.run(OracleSchemaTest.java:29)
    at dfranklin.OracleSchemaTest.main(OracleSchemaTest.java:23)
    The output shows that the EntityResolver is not being called to
    resolve 'XMLSchema.dtd'.
    === begin OracleSchemaTest.java ===
    package dfranklin;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.InputStream;
    import oracle.xml.parser.schema.XMLSchema;
    import oracle.xml.parser.schema.XSDBuilder;
    import oracle.xml.parser.schema.XSDException;
    import oracle.xml.parser.v2.XMLError;
    import org.xml.sax.InputSource;
    public class OracleSchemaTest
    implements org.xml.sax.EntityResolver
    private static String xsdstr;
    private static String basepath = "/tmp/xsd";
    public static void main(String[] args)
    throws Exception
    xsdstr = args[0];
    new OracleSchemaTest().run();
    public void run()
    throws Exception
    XMLSchema xmlSchema = buildXMLSchema(xsdstr);
    System.out.println("xmlSchema=" + xmlSchema);
    public XMLSchema buildXMLSchema(String systemId)
    throws Exception
    XSDBuilder xsdBuilder = new XSDBuilder();
    xsdBuilder.setEntityResolver(this);
    InputStream xsdin = null;
    InputSource insrc = resolveEntity(null, xsdstr);
    if (insrc != null) {
    xsdin = insrc.getByteStream();
    if (xsdin == null) {
    throw new IOException("Can't resolve entity " + xsdstr);
    XMLSchema xmlSchema = (XMLSchema)xsdBuilder.build(xsdin, null);
    return xmlSchema;
    public InputSource resolveEntity(String publicId, String systemId)
    throws
    org.xml.sax.SAXException,
    java.io.IOException
    System.err.println("resolveEntity: " + publicId + ", " + systemId);
    String fn;
    if ("http://www.w3.org/2001/xml.xsd".equals(systemId)) {
    fn = basepath + "/" + "xml.xsd";
    } else if ("http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd".equals(systemId)) {
    fn = basepath + "/" + "xmldsig-core-schema.xsd";
    } else if ("http://www.w3.org/2001/XMLSchema.dtd".equals(systemId)) {
    fn = basepath + "/" + "XMLSchema.dtd";
    } else {
    fn = basepath + "/" + systemId;
    try {
    InputStream in = new FileInputStream(fn);
    System.err.println("resolved to " + fn);
    InputSource insrc = new InputSource(in);
    insrc.setSystemId(systemId);
    return insrc;
    } catch (FileNotFoundException e) {
    return null;
    ==== end OracleSchemaTest.java ===

  • How can we get the reference of XML element on frame as soon as frame is created in Document?

    Hi,
    When ever we copy any text/table cells from any frame, and paste it directly on page, A new Frame is created and the pasted text is placed inside that frame.
    Now to capture this frame creation, We have two possible solutions:
    1) Attach Observer on Document 'kDocBoss' on IID_IHIERARCHY_DOCUMENT and it will notify on frame creation in update function.
    2) Notification event on new story creation.
    Now, I need to perform some changes in the newly created table, for example:
    a)  Need to delete XML tags from newly created frame
    b)  Need to perform action on table cells if any in the created frame.
    But the problem is, when the event comes, I can access basic properties of frame like it's name, type etc, but it does not give me the
    XML element on frame or tables in frame until the event is com pleat.
    I know it's quite a specif requirement, but I guess many of you might have faced these kind of challenges, while processing the event.
    Does any one has any idea how I can get the reference of XML element on frame as soon as it is created?

    Hi Kapoor,
    please give also others a chance, and excuse that I get up late on vacation ;-)
    Anyway, I'd keep the story creation responder to recognize the copy, then combine it with an observer on the backing xml story to catch the associated XML element which is created there. Something like below:
    UIDRef xmlStoryRef = Utils<IXMLUtils>()->GetBackingStore(doc);
    InterfacePtr<ISubject> subject ( xmlStoryRef,IID_ISUBJECT );
    subject->AttachObserver(observer,IID_IIDXMLELEMENT,observer->GetAttachIID());

  • Can't convert oracle.xml.parser.DTD to oracle.xml.parser.v2.DTD.

    I am getting the following Error while trying
    to compile the SampleMain.java file(Generating an XML document from a given Employee.dtd).
    I have set my classpath to use xmlparser.jar.
    D:\XMls>javac SampleMain.java
    SampleMain.java:65: Can't convert oracle.xml.parser.DTD to oracle.xml.parser.v2.DTD.
    main(java.l
    ang.String[]).
    generator.generate(dtd, doctype_name);

    Would you check the java parser version you are using? If using java parser V2, the normal lib name is xmlparserv2.jar.
    null

  • R12 Payment Process Request Status Report adding extra columns to XML data.

    In 11i, we had modified the Preliminary Payment Report to include extra columns ( invoice distributions). In r12 , that report is obsolete and Oracle introduced a new report "Payment Process Request Status Report". This request uses BI Publisher to generate the final report output. I am unable to modify the template since the XML output of the report does not
    contain the invoice distribution account data. We need to know how can we modify the XML data to include the extra columns.
    For Funds Disbursement Process ( Payment Instruction File) , Oracle provides IBY_FD_EXTRACT_EXT_PUB extensibility package to construct custom XML element structure that can be added to the payment XML extract generated by Oracle Payments. Do we have something similar for this report ? Are there any other options available ?
    Thanks

    Hi
    The same package "IBY_FD_EXTRACT_EXT_PUB" works for payment process request status report also. Please add the logic to get the distribution data in this package and you will see the new XML tags in this report also.
    Hope this helps.
    Vinit

  • Solved: "Error in loading DLL" adding vb Reference to Photoshop CS5.1 (CS5.5)

    It took me a while to solve this so I thought I'd post the solution.
    On two machines (one 32-bit the other 64-bit) running the new Phonoshop CS5.1 that ships with CS5.5, I had trouble adding a reference in vb (vba) to the Photoshop Object Library for scripting:
    I would just get: Error in Loading DLL
    It appears that on both machines, the CS5.5 installer incorectly referenced the dll which is called "ScriptingSupport.8li" (not exactly a .dll-looking name but anyway ;-)
    The Adobe CS5.5 installer set the system registry to look for the file in:
    C:\Program Files\Adobe\Adobe Photoshop CS5.1 (64 Bit)\Plug-ins\Automate
    or
    C:\Program Files\Adobe\Adobe Photoshop CS5.1\Plug-ins\Automate
    but installed the file to:
    C:\Program Files\Adobe\Adobe Photoshop CS5.1 (64 Bit)\Plug-ins\Extensions
    or
    C:\Program Files\Adobe\Adobe Photoshop CS5.1\Plug-ins\Extensions
    I copied ScriptingSupport.8li from the Extensions folder to the Automate folder and it started working.
    Hope this helps someone else. :-)
    Tony

    Yes, another user has the issue with windows "mandatory profiles", where rights are severely limited for users (french forum): http://forums.adobe.com/thread/948264

Maybe you are looking for

  • In my Mac Mail Version 4.5, I am not received email pdf attachement. It is shown in some html like form in message content. Please help

    In my Mac Mail Version 4.5, I am not received email pdf attachement. It is shown in some html like form in message content. Please help

  • Java scripting-linearized PDF

    Hi,  I m working with Acrobat X.  I don't know how to prepare java scripts for the below desired functions. Hoever i want to import some java scripts through Acrobat X "Action Wizard" for batch processing. If you can share these scripts, pls. provide

  • ALV Tree - how to put checkbox on the node level?

    Hello everyone! I have an AlvTree and I have special column named SEL. That column contains checkboxes. I want to put additional checkboxes at the node level, I need them to create select all option. In other words I must somehow create something sim

  • Input type file go outside portal

    Hi i'm writing a portlet that allow the user to save files to a server, to do that i got a classic button: <input id="Attachment1" type="file" runat="server" NAME="Attachment1"> everything works fine, but in the portlet i got a link button to navigat

  • Odd behaviour in Firefox

    Hello, one page of my site looks fine in Safari and IE on a PC running XP, but not in Firefox on XP or OSX 10.5.1. This is the most recent Firefox release, 2.0.0.11. The address is http://www.janeandjohn.net/Main/Mallorca_2007.html This embeds a page