Creation of XML !DOCTYPE DTD Validation line

Hello all!
I've been working in the creation of an XML File via Abap Objects.
<b>if_ixml</b>          For Document Header
<b>if_ixml_document</b> For Document Header
<b>if_ixml_element</b>  For Nodes and their Child Nodes
I have already developed the code for creating the XML File.
I think I have it completed, but I don't know how to insert the line that starts with <!DOCTYPE>.
This line validates all the DOM tree structure against a DTD File.
I've been searching for an example of how to do it, but I dind't find anything
Wich is the proper Class, object or method that I have to implement for this topic?
The Line I have to post on the XML file is one like this:
<!DOCTYPE e-billing-payable PUBLIC "-//BxxxxFxxxxx.com//DTD Ebilling Enterprise to Bank 1.0//EN" "https://hb.xxx.com.ar/cobranzasonline/ebillingE2B.dtd">
Thanks in advance,
Claudio.

Thanks Sandra, I was succesfull in getting the doc type but here is the format that I need
<!DOCTYPE gsafeed PUBLIC "-//Google//DTD GSA Feeds//EN" "gsafeed.dtd">
If I try to use entity declaration , it dosen't let me without passing the SYSTEM paramater. Is there any method within if_ixml_document_type or outside, that would help me pass the attributes to get in the below format.
<!DOCTYPE rootElement PUBLIC "PublicIdentifier" "URIreference">
Thanks
Ganesh.S

Similar Messages

  • XML SAX dtd Validation Problem

    Hi,
              I’m having problems getting an xml document to validate within Weblogic 8.1. I am trying to parse a document that references both a dtd and xsd. Both the schema and dtd reference need to be substituted so they use local paths. I specify the schema the parser should use and have created an entityResolver to change the dtd reference.
              When this runs as a standalone app from eclipse the file parses and validates without a problem. When deployed to the app server the process seems to be unable read the contents of the dtd. Its not that it cannot find the file (no FileNotFoundException is thrown but this can be created if I delete the dtd) rather it seems to find no declared elements.
              Initial thought was that the code didn’t have access to read the dtd from its location on disk, to check I moved the dtd to within the deployed war and reference as a resource. The problem still persists.
              Code Snippet:
              boolean isValid = false;
              try {
              // Create and configure factory
              SAXParserFactory factory = SAXParserFactoryImpl.newInstance();
              factory.setValidating(true);
              factory.setNamespaceAware(true);
              // To be notified of validation errors in the XML document,
              // add a custom error handler to the document builder
              PIMSFeedFileValidationHandler handler
              = new PIMSFeedFileValidationHandler();
              // Create and Configure Parser
              SAXParser parser = factory.newSAXParser();
              parser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
              parser.setProperty(NAMESPACE_PROPERTY_KEY, getSchemaFilePath());
              // Set reader with entityResolver for dtd
              XMLReader xmlReader = parser.getXMLReader();
              xmlReader.setEntityResolver(new SAXEntityResolver(this.dtdPath));
              // convert file to URL, as it is a remote file
              URL url = super.getFile().toURL();
              // Open an input stream and parse
              InputStream is = url.openStream();
              xmlReader.setErrorHandler(handler);
              xmlReader.parse(new InputSource(is));
              is.close();
              // get the result of parsing the document by checking the
              // errorhandler's isValid property
              isValid = handler.isValid();
              if (!isValid) {
              LOGGER.warn(handler.getMessage());
              LOGGER.debug("XML file is valid XML? " + isValid);
              } catch (ParserConfigurationException e) {
              LOGGER.error("Error parsing file", e);
              } catch (SAXException e) {
              LOGGER.error("Error parsing file", e);
              } catch (IOException e) {
              throw new FeedException(e);
              return isValid;
              See stack trace below for a little more info.
              2005-01-28 10:24:09,217 [DEBUG] [file] - Attempting validation of file 'cw501205.wa1.xml' with schema at 'C:/pims-feeds/hansard/schema/hansard-v1-9.xsd'
              2005-01-28 10:24:09,217 [DEBUG] [file] - Entity Resolver is using DTD path file:C:/Vignette/runtime_services/8.1/install/common/nodemanager/
              VgnVCMServer/stage/pims-hansard/pims-hansard.war/WEB-INF/classes/com/morse/pims/cms/feed/sax/ISO-Entities.dtd
              2005-01-28 10:24:09,227 [DEBUG] [file] - Creating InputSource at: file:C:/Vignette/runtime_services/8.1/install/common/nodemanager/VgnVCMServer/stage/pims-hansard/pims-hansard.war/WEB-INF/classes/com/morse/pims/cms/feed/sax/ISO-Entities.dtd
              2005-01-28 10:24:09,718 [WARN ] [file] - org.xml.sax.SAXParseException: Element type "Hansard" must be declared.
              org.xml.sax.SAXParseException: Element type "Session" must be declared.
              org.xml.sax.SAXParseException: Element type "DailyRecord" must be declared.
              org.xml.sax.SAXParseException: Element type "Volume" must be declared.
              org.xml.sax.SAXParseException: Element type "Written" must be declared.
              org.xml.sax.SAXParseException: Element type "WrittenHeading" must be declared.
              org.xml.sax.SAXParseException: Element type "Introduction" must be declared.
              … continues for all the elements in the doc
              2005-01-28 10:24:10,519 [DEBUG] [file] - XML file is valid XML? false
              2005-01-28 10:24:10,519 [WARN ] [file] - Daily Part file 'cw501205.wa1.xml' was not valid XML and was not processed.
              Has anybody seen this behavior before with weblogic and if so how have you resolved the issue.
              Thanks in Advance
              Adam

    It looks like you clicked on "Post" before you got around to explaining your problem. I don't see any error messages or any description of what was supposed to happen and what happened instead.
    Now, I don't know anything about XML Schema, but just guessing at how that unique name feature might be designed, and just guessing that your unique name is actually in the <userId> element, I would suggest that this:
    <xsd:unique name="un_name"> 
      <xsd:selector xpath="USER"/> 
      <xsd:field xpath="."/> 
    </xsd:unique> is at fault because it doesn't mention the <userId> element anywhere.

  • How to disable XML´s DTD validation in Weblogic10?

    Hello folks, we are trying to upgrade our server to Weblogic10, but it´s XML parser is validating XML´s DTD and ´cause we are behind a firewall we receive a error like:
    Tried all: ´6´ address, but could not connect over HTTP to server: 'www.w3.org', port: '80'
    Does anyone here known how to disable DTD validation in WL10?
    Regards,
    lottalava

    Well you can create non validating parser programatically .
    http://edocs.bea.com/wls/docs100/xml/programming.html#wp1069856
    i.e.
    SAXParserFactory spf = SAXParserFactory.newInstance();
    spf.setValidating(false);
    Hope this helps.

  • JDev 9.0.3_2: web.xml fails DTD validation

    Hi all,
    I just started using JDev 9.0.3_2 and found that it is trying to validate my web.xml when I build my Project.
    It is complaining about the <distributable> Tag inside my web.xml file. It should NOT be complaining about this, but it is obviously using either an outdated DTD or the wrong one.
    How can I either point JDev at the correct DTD or get it to stop attemting to validate web.xml?
    Thanks!
    Kevin Dougan

    I think I have figured out a workaround: It appears that JDeveloper is extremely picking about web.xml and validates it in a strict sense. You MUST put your elements in EXACTLY the same order as specified in the DTD, or it throws an error.
    However, that doesn't answer my original question: Is there a way to specify the DTD for web.xml (or other elements for that matter, Schema's aside for the moment) or at least turn off this form of validation? If not in the current release, is this coming in 9.0.4 or 9.0.5?
    Thanks again,
    Kevin

  • Ejb-jar.xml DTD validation error?

    I am attempting to deploy a JAR on App Server 8 PE. The application does not contain any EJBs but I understand that the ejb-jar.xml descriptor is still needed. I am running the app server on Windows XP.
    My issue is as follows:
    I understand that the root element for the ejb-jar.xml file (<ejb-jar>) is required. Since I have no EJBs, I should be able to leave this root element blank (as I have in previoius successful deployments to earlier versions of Sun App Server). When I attempt to deploy, I receive the following DTD Validation error via the admin console:
    The content of element type "ejb-jar" is incomplete, it must match "(description?,display-name?,small-icon?,large-icon?,enterprise-beans,relationships?,assembly-descriptor?,ejb-client-jar?)".
    Am I missing something?
    My ejb-jar.xml file looks like:
    <!DOCTYPE ejb-jar PUBLIC
         "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
         "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    </ejb-jar>
    Many thanks in advance to any assistance...

    I am attempting to deploy a JAR on App Server 8 PE.
    The application does not contain any EJBs but I
    I understand that the ejb-jar.xml descriptor is still
    needed. I am running the app server on Windows XP.
    My issue is as follows:
    I understand that the root element for the
    ejb-jar.xml file (<ejb-jar>) is required. Since I
    have no EJBs, I should be able to leave this root
    element blank (as I have in previoius successful
    deployments to earlier versions of Sun App Server).
    When I attempt to deploy, I receive the following
    g DTD Validation error via the admin console:
    The content of element type "ejb-jar" is incomplete,
    it must match
    "(description?,display-name?,small-icon?,large-icon?,e
    nterprise-beans,relationships?,assembly-descriptor?,ej
    b-client-jar?)".
    Am I missing something?
    My ejb-jar.xml file looks like:
    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
    s 2.0//EN"
         "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    </ejb-jar>
    Many thanks in advance to any assistance...I hav tried this and it is working
    <?xml version="1.0" encoding="UTF-8" ?>
    <ejb-jar
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
    version="2.1">

  • Validation of XML document % DTD

    I need method which allows to check if an XML document is valid regards its DTD. is it possible?
    I use JDOM.
    thanks,

    I need method which allows to check if an XML
    document is valid regards its DTD. is it possible?
    I use JDOM.But it would be the parser that validates the XML against its DTD. JDOM is not a parser, it uses some other product (which you can specify, I believe) to do the parsing. So the answer would be yes, since parsers do exist that can validate against a DTD.

  • Validating an xml with DTD external DTD

    Hi
    how can i validate my XML File with an external DTD ?
    thanks for your replies
    serge

    Hi,
    when you use the XML Library, the interface <b>if_ixml_parser</b> has a static method <b>set_validation( )</b> to activate and deactivate a DTD validation.
    There are the follow constants in the if_ixml_parser for the DTD validation-mode:
    <b>if_ixml_parser=>co_no_validation</b>
    Do not validate the XML-Document against the document type definition (DTD)
    <b>if_ixml_parser=>co_validate</b>
    Validate the XML-Document against the document type definition (DTD)
    <b>if_ixml_parser=>co_validate_if_dtd</b>
    Validate the XML-Document against the document type definition (DTD) if a DTD is specified. Otherwise parse the Document in non validating mode.
    see also the SAP online-help:
    <a href="http://help.sap.com/saphelp_webas610/helpdata/de/bb/5766b2dca511d4990b00508b6b8b11/content.htm">Interface if_ixml_parser</a>
    Regards
    Stefan

  • HOW TO KNOW VALID XML WITH DTD ? WITHOUT PARSING  ?

    i am creating the xml file
    i need to validate the xml with DTD to confirm is it valid or not ?
    with out parsing...
    could you tell me how ?
    Durga

    without parsing u cant do it..

  • Validating xml with dtd

    Hi,
             I have found a piece of code through google, to validate an xml file with an external dtd file. which is
               function validateDocument()
                    xmlDocumentObject = new ActiveXObject("microsoft.XMLDOM")
                    xmlDocumentObject.onreadystatechange = changeHandler
                    xmlDocumentObject.load('C:\\My.xml')
                function changeHandler()
               and for that we need to a import i.e  #import "C:\WINDOWS\system32\msxml4.dll"
              here when i try to import "msxml4.dll" in Acrobat javascript (js) file, it is giving error, application exits.
               How can i import dll in Acrobat javascript to get some functionality, or if not
              What someother way to achieve this(To validate xml with dtd file).
             This is totally making me crazy, please someone help me on this issue.
    thanks in advance.

    thanks Leonard,
             But my problem is i have an xml(i created that using acrobat javascript)and a dtd file, i want validate xml file with that dtd, using acrobat or some other way.  How can i validate xml with dtd, please help me.

  • XML File Tags Validation Using Oracle.

    Dear Forum Members,
    I have a doubt regarding XML File Tags Validation.
    First I will explain My Requirement.
    1. I have to generate an XML File in a Predefined Format.
    2. User will add some data in the elements, or he may copy the same elements and change to some data like
    <Emp><Empno>10</Empno></Emp>
    The above tag will be generated by the application.
    User will copy the same and change to
    <Emp><Empno>20</Empno></Emp>.
    Now he want to Upload the Changed XML File to the Database table. This is done by parsing the XML File.
    The Creation and Parsing section is over. But before Parsing I want to check for the Validation of the XML Tag. i.e. whether the tag he has copied <Emp><Empno>10</Empno></Emp> is chaned by mistake to
    <Emp><Empno>10</Empno></Emps> or some other Mistakes.
    What I have to Do..
    Regards
    Madhu K

    I still think that my previous response is valid:
    If you e.g. include (concat) your DTD in your XML it will be validated against it!
    See e.g.:
    michaels>  select xmltype (xml_dtd || your_xml) your_validated_xml
      from (select '<SSDDATA>
                     <KEY><![CDATA[6707]]></KEY>
                     <FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
                     <DEFAULT></DEFAULT>
                     <MIN></MIN>
                     <MAX></MAX>
                     <UNIT></UNIT>
                     <FORMULA></FORMULA>
                     <FORMULA></FORMULA>
                     <FORMULA-DESC></FORMULA-DESC>
                     <ADVANCED-FORMULA></ADVANCED-FORMULA>
                     <INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
                     <DATA-DESC-REPORT></DATA-DESC-REPORT>
                     <REV-DESC></REV-DESC>
                    </SSDDATA>' your_xml,
                   '<?xml version="1.0"?>
                    <!DOCTYPE SSDDATA [
                      <!ELEMENT SSDDATA (KEY,FINISHED,DEFAULT,MIN,MAX,UNIT,(FORMULA)+,FORMULA-DESC,ADVANCED-FORMULA,INTERNAL-ADAPT-DESC,DATA-DESC-REPORT,REV-DESC)>
                      <!ATTLIST SSDDATA xmlns CDATA #FIXED "">
                      <!ELEMENT KEY (#PCDATA)>
                      <!ATTLIST KEY xmlns CDATA #FIXED "">
                      <!ELEMENT FINISHED (#PCDATA)>
                      <!ATTLIST FINISHED xmlns CDATA #FIXED "">
                      <!ELEMENT DEFAULT EMPTY>
                      <!ATTLIST DEFAULT xmlns CDATA #FIXED "">
                      <!ELEMENT MIN EMPTY>
                      <!ATTLIST MIN xmlns CDATA #FIXED "">
                      <!ELEMENT MAX EMPTY>
                      <!ATTLIST MAX xmlns CDATA #FIXED "">
                      <!ELEMENT UNIT EMPTY>
                      <!ATTLIST UNIT xmlns CDATA #FIXED "">
                      <!ELEMENT FORMULA EMPTY>
                      <!ATTLIST FORMULA xmlns CDATA #FIXED "">
                      <!ELEMENT FORMULA-DESC EMPTY>
                      <!ATTLIST FORMULA-DESC xmlns CDATA #FIXED "">
                      <!ELEMENT ADVANCED-FORMULA EMPTY>
                      <!ATTLIST ADVANCED-FORMULA xmlns CDATA #FIXED "">
                      <!ELEMENT INTERNAL-ADAPT-DESC EMPTY>
                      <!ATTLIST INTERNAL-ADAPT-DESC xmlns CDATA #FIXED "">
                      <!ELEMENT DATA-DESC-REPORT EMPTY>
                      <!ATTLIST DATA-DESC-REPORT xmlns CDATA #FIXED "">
                      <!ELEMENT REV-DESC EMPTY>
                      <!ATTLIST REV-DESC xmlns CDATA #FIXED "">
                    ]>' xml_dtd
              from dual)
    YOUR_VALIDATED_XML                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
    <?xml version="1.0"?>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                    <!DOCTYPE SSDDATA [                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                      <!ELEMENT SSDDATA (KEY,FINISHED,DEFAULT,MIN,MAX,UNIT,(FORMULA)+,FORMULA-DESC,ADVANCED-FORMULA,INTERNAL-ADAPT-DESC,DATA-DESC-REPORT,REV-DESC)>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                      <!ATTLIST SSDDATA xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                      <!ELEMENT KEY (#PCDATA)>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                      <!ATTLIST KEY xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                      <!ELEMENT FINISHED (#PCDATA)>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                      <!ATTLIST FINISHED xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                      <!ELEMENT DEFAULT EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                      <!ATTLIST DEFAULT xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                      <!ELEMENT MIN EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                      <!ATTLIST MIN xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                      <!ELEMENT MAX EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                      <!ATTLIST MAX xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                      <!ELEMENT UNIT EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                      <!ATTLIST UNIT xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                      <!ELEMENT FORMULA EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                      <!ATTLIST FORMULA xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                      <!ELEMENT FORMULA-DESC EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                      <!ATTLIST FORMULA-DESC xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                      <!ELEMENT ADVANCED-FORMULA EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                      <!ATTLIST ADVANCED-FORMULA xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                      <!ELEMENT INTERNAL-ADAPT-DESC EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                      <!ATTLIST INTERNAL-ADAPT-DESC xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                      <!ELEMENT DATA-DESC-REPORT EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                      <!ATTLIST DATA-DESC-REPORT xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                      <!ELEMENT REV-DESC EMPTY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                      <!ATTLIST REV-DESC xmlns CDATA #FIXED "">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                    ]><SSDDATA>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                     <KEY><![CDATA[6707]]></KEY>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                     <FINISHED><![CDATA[This is a Finished data ]]></FINISHED>                                                                                                                                                                                                                                                                            

  • Message Mapping - Turn Off dtd validation

    Hi,
    I would like to know how to turn off dtd validation in a message map.
    The source message type is based on dtd. When testing, I get the following error
    java.io.IOException: Failed to load resource from the context classloader of the current thread! Loading from classloader was caused by: java.io.FileNotFoundException: D:\usr\sap\XYZ\DVEBMGS01\j2ee\cluster\server0\abc.dtd (The system cannot find the file specified)
    I understand that the map requires the dtd to be present in the application folder. But, can I change some setting not to look up this file.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE MessageContainer SYSTEM "abc.dtd">

    Sorry Arvind. Not able to understand your question.
    The problem we are facing is, when the input xml file contains DocType declaration with reference to a dtd, we get an error stating the dtd is not found in the j2ee application folder.
    It works fine if the dtd is saved in the location. Also, it works fine if the DocType declaration is removed from the xml file. However, we are exploring an option where declaration is used but dtd is not available.
    Is there any way to achieve this?
    Thanks!

  • 9.0.3 validates an invalid XML document as valid

    JDeveloper 9.0.3 validates the XML document below with no errors, although it contains several. It also insists on a namespare (even a blank one) before the validator will run, even though it has an internal DTD.
    Also, there is no DTD file type in JDeveloper. Why?
    -----------------------Clip here-----------
    <?xml version="1.0"?>
    <!DOCTYPE todo [
    <!ATTLIST description priority NMTOKEN "low">
    <!ELEMENT description (#PCDATA)>
    <!ELEMENT task (description)>
    <!ELEMENT todo (task)+>
    ]>
    <todo xmlns="">
    <task>
    <description priority="high">Backup sales data for last month</description>
    </task>
    <task>
    <description priority="l ow">Complete end of month report</description>
    </task>
    <task>xxx</task>
    </todo>

    Ed,
    JDev 9.0.3 supports validation based on XML Schema only, not DTD.
    DTD validation is being considered for a future release, but has not
    been scheduled yet so I cannot give you an idea of when it's coming.
    I'll try to encourage the team to write a little Extension we could
    put up on OTN to restore this validate against the DTD feature that
    JDeveloper 3.2 did support.

  • XML and DTD parsing

    How do I validate an xml file using a dtd in Java? Is there a parser that validates xml's against dtd's?
    I have parsed the xml file that contains the DOCTYPE necessary to define the dtd. However, the parser only seems to check whether or not the dtd exists but doesn't bother to check whether the xml file is valid given the specified dtd?
    I am using the jaxp parser.
    Kind Regards,
    Fadi

    Take a look at the xerces parser (http://xml.apache.org/).
    --Arnout                                                                                                                                                                                           

  • Issue in Creation of XML file from ABAP data

    Hi,
    I need to create a XML file, but am not facing some issues in creation of XML file, the in the required format.
    The required format is
    -<Header1 1st field= u201CValueu201D 2nd field= u201CValueu201D>
       - <Header2 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 10 fields>
              <Header3 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
              <Header4  1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 4 fields/.>
               <Header5 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
          </Header2>
       </Header1>
    Iu2019m using the call transformation to convert ABAP data to XML file.
    So please anybody can help how to define XML structure in transaction XSLT_TOOL.
    And one more thing, here I need to put the condition to display the Header 3, Header 4, Header 5 values. If there is no record for a particular line item in header 3, 4 & 5, I donu2019t want to display full line items; this is only for Header 3, 4 & 5.
    Please help me in this to get it resolved.

    Hello,
    you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
    If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
    Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
    Regards Otto

  • Weblogic 9.2 JDk 1.5 DTD Validation

    Hi
    We are using xerces parser and doing DTD Validation .
    We want to have all the DTD present in the local directory
    C:/temp( as reading from the WAR is a performance hit)
    When we try to run with Weblogic 8.1 ( with JDK1.4 and JDK1.5 ) the xml is being parsed properly and validated with DTD without any errors
    But when we are trying to Validate the DTD with Weblogic 9.2 and JDK 1.5 it gives the error
    C:/temp/a.dtd not found even though the DTD is present in that location .
    Is there a settiing in Weblogic 9.2 which needs to be set for it to read local file system files?
    Thanks
    Sachin

    weblogic 9.2 uses jdk 1.5_04 if i recall correctly.

Maybe you are looking for

  • Pixelated web gallery images

    I am experiencing several pixelated images in web galleries that I create.  It seems that the pixelation occurs only with the color black such as a black suit.  The pixels show up as whit or white-gray.  Here is one example.  There are about 12 image

  • All text I do on PSE 13 is stuck on caps lock. Any solutions?

    Hey guys, as the title says, my PSE13 has all of its text stuck on caps lock. I'm on a licensed version for a Mac, which I got just the other day. And yes, I'm a noob, so please bear with me. Thanks!

  • Problems with 1-Step RoboPDF

    I am using RoboHelp X5. It seems I can't get RoboPDF to start. Neither can I uninstall it to reinstall it. I want to be able to directly generate PDF without going through Word first. I have the RoboHelp 6 upgrade, but I wanted to finish my current p

  • Accessibility and Validation

    QUESTION ONE: How does one test for proper accessibility? (See Background) QUESTION TWO: Why I am obtaining an error code for my <p> tag when I go to validate for HTML? (See Error Message) BACKGROUND I have been playing around with floated images, di

  • Converting a double to binary

    Hey all, I am having difficultly trying to devise a simple method for converting a double to its binary representation. The value that I am dealing with is ~10^32, so I cannot use int or long. Any advice/suggestions would be appreciated. Shanks.