XML DTD

i am using filtering in xml but after i add it i can access the whole web page... i hav change the DOCTYPE to web-app_2_3.dtd but still failed.. this is my xml file.. thanks
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC
     "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
     "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<welcome-file-list>
     <welcome-file>
index.jsp
</welcome-file>
     <welcome-file>
index.html
</welcome-file>
<welcome-file>
index.htm
</welcome-file>
<welcome-file>
home.jsp
</welcome-file>
<welcome-file>
home.htm
</welcome-file>
</welcome-file-list>
<!-- CLICKSTREAM LOGGER -->
<filter>
<filter-name>Clickstream Filter</filter-name>
<filter-class>ClickstreamFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Clickstream Filter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Clickstream Filter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<listener>
<listener-class>ClickstreamLogger</listener-class>
</listener>
<!-- END CLICKSTREAM LOGGER -->
</web-app>

The web_app_2_3.dtd specifies that elements are ordered.
Here's the required order. You'll note that you must place your filter elements before the Welcome elements.
<!ELEMENT web-app (icon?,
display-name?,
description?,
distributable?,
context-param*,
filter*,
filter-mapping*,
listener*,
servlet*,
servlet-mapping*,
session-config?,
mime-mapping*,
welcome-file-list?,
error-page*,
taglib*,
resource-env-ref*,
resource-ref*,
security-constraint*,
login-config?,
security-role*,
env-entry*,
ejb-ref*,
ejb-local-ref*)>
Dave

Similar Messages

  • XML/DTD to be converted to XSD

    Hi ,
    I have requirement that i am getting xml file as input which i need to read through inbound file adaptor and write another delimited file.
    The challenge i am facing is i am not able to transmit xml file to xsd file trough native format builder.
    Can you please provide solution for generating xsd file for xml files.
    Note: There is format type called "DTD to be converted to XSD" under native format builder wizard.Is it like that first we need to convert xml to DTD then XSD?
    If so can you please geve me small example of demonstrating these steps,because whenever i try with sample dtd file i am getting error: "No element found in DTD Specified"
    My sample file "note.dtd" is <?xml version="1.0"?>
    <!DOCTYPE note [
    <!ELEMENT note (to,from,heading,body)>
    <!ELEMENT to (#PCDATA)>
    <!ELEMENT from (#PCDATA)>
    <!ELEMENT heading (#PCDATA)>
    <!ELEMENT body (#PCDATA)>
    ]>
    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend</body>
    </note>
    Thanks in advance.

    U can use Document Editor tool to convert XML file to DTD. The steps are
    File-->Import-->Chose DTD from XML file option and give ur file as input-->It will convert ur XML file into ECS file-->File-->Export-->select XML DTD option and this will convert the ECS file to DTD file
    U can use BPEL to convert DTD file to XSD. The steps are
    Tools-->Convert DTD to XSD and give ur DTD file as Input-->It will convert ur DTD file to XSD file
    I hope it will help.
    Thanks,
    Saravana
    Edited by: user10635261 on Nov 20, 2008 9:41 AM

  • XML DTD - Table or Object

    Dear all,
    Do you have any guideline or good example to model db tables for nested Structure of XML DTD?
    How can I create table or objects for following XML DTD?
    <!ELEMENT book (title, author, Chapter*)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT author (#PCDATA)>
    <!ELEMENT Chapter (content, body?)>
    <!ELEMTNS content (#PCDATA)>
    <!ELEMENT body (#PCDATA)>
    null

    i hope that this exampel of nested table will help you
    create or replace type test1_obj as object (num1 number(4),num2 number(4));
    create type test1_obj_teble as table of test1_obj;
    create table test101(csec number(4),tnum number(4),ditals test1_obj_teble) nested table ditals store as test1_ditals;
    /

  • Discrepancy between weblogic-ejb-jar.xml DTD and documentation

    There seems to be a discrepancy between the DTD for the weblogic-ejb-jar.xml file
    and the WLS7 documentation: Which source of information should I treat as
    For example, the WLS7 documentation contains no information on the <idempotent-methods>
    element (and its child elements)
    (There is also a (larger) discrepancy between the weblogic-application.xml DTD and
    the docs - I will post that Q under application deployment)
    Regards,
    Nick

    Yep, I noticed it too. I used DTD, of course.
    "Nick Minutello" <[email protected]> wrote
    in message news:[email protected]..
    >
    >
    There seems to be a discrepancy between the DTD for theweblogic-ejb-jar.xml file
    and the WLS7 documentation: Which source of information should I treat as
    For example, the WLS7 documentation contains no information on the<idempotent-methods>
    element (and its child elements)
    (There is also a (larger) discrepancy between the weblogic-application.xmlDTD and
    the docs - I will post that Q under application deployment)
    Regards,
    Nick

  • Help needed with binary data in xml (dtd,xml inside)

    I am using the java xml sql utility. I am trying to load some info into a table.
    my.dtd:
    <!ELEMENT ROWSET (ROW*)>
    <!ELEMENT ROW (ID,JPEGS?)>
    <!ELEMENT ID (#PCDATA)>
    <!ELEMENT DESCRIPTION EMPTY>
    <!ATTLIST DESCRIPTION file ENTITY #REQUIRED>
    <!NOTATION INFOFILE SYSTEM "Files with binary data inside">
    <!ENTITY file1 SYSTEM "abc.jpg" NDATA INFOFILE>
    xml file:
    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE ROWSET SYSTEM "MY.DTD">
    <ROWSET>
    <ROW>
    <ID>1272</ID>
    <DESCRIPTION file="file1"/>
    </ROW>
    </ROWSET>
    I am using the insertXML method to do this. However, the only value that gets loaded is the ID. abc.jpg is in the same directory where I ran the java program.
    Thanks in advance.

    Sorry! wrong dtd. It should read this instead:
    my.dtd:
    <!ELEMENT ROWSET (ROW*)>
    <!ELEMENT ROW (ID,DESCRIPTION?)>
    <!ELEMENT ID (#PCDATA)>
    <!ELEMENT DESCRIPTION EMPTY>
    <!ATTLIST DESCRIPTION file ENTITY #REQUIRED>
    <!NOTATION INFOFILE SYSTEM "Files with binary data inside">
    <!ENTITY file1 SYSTEM "abc.jpg" NDATA INFOFILE>
    null

  • How to insert XML/dtd data into oracle db

    Hi,
    I have posted this question on couple
    sites and unfortunately I haven't received
    any response. Hopefully this time,
    someone can at least direct me to the
    website/document/sample codes which can provide me solutions of my question.
    My question is:
    Given a DTD, can the XML SQL Utility generate
    the database schema?
    I am trying to find out how the XML data can
    be loaded into the oracle database.
    Thanks in advance,
    Judy
    null

    A DTD does not contain enough information to do a good job at creating a database schema. It contains no datatype information, no field length information for starters, so a table created by a hypothetical DTD->to->Tables utility would be at best able to create a table with all VARCHAR2(4000) columns. Not that useful.
    My book contains lots of examples of techniques for loading XML data into Oracle, include lots of sample code and a whole chapter devoted to building a flexible "XMLLoader" utility for loading XML of arbitrary size into the database.
    Steve Muench
    Development Lead, Oracle XSQL Pages Framework
    Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
    Author, Building Oracle XML Applications
    null

  • 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">

  • Importing XML DTD in 10.1.2.0.0

    Hi,
    We are attempting to import Common Data Types using DTD's and experiencing some strange behaviour.
    I have defined my DTD as detailed in the user guides.
    <!ELEMENT account (cust_account_id,account_number,attribute_category, etc ... )>
    <!ELEMENT cust_account_id (#PCDATA)>
    <!ELEMENT account_number (#PCDATA)>
    <!ELEMENT attribute_category (#PCDATA)>
    etc ...
    The import step appears to work fine and at the end of this process the CDT attributes appear as required and expected.
    If we close iStudio and reopen, then attempt to edit the CDT we encounter an issue as it appears that account belongs to account beloings to account and so on .... i.e. we seem to get into an infinite loop.
    Has anyone experienced/resolved this issue before?
    Thanks,
    Michael.

    I have identified a workaround.
    CDT -> New; Import XML - choose relevant dtd, e.g. account.dtd
    CDT created ... but type = account.
    Re-import account.dtd - get a second account in CDT - this time the type = account2.
    Delete first account entry. Then Save.
    The CDT is available for use - no recursive loop.
    This sill doesnt explain why we are unable to import successfully at first attempt however.

  • FORMS6 - XML/DTD Sample Code???

    Dear Sirs:
    we are still developing FORMS 6 application. We would like to generate XML documents according to the definition contained in DTD files - a technology we still don't know.
    Do You know whether sample PL/SQL code dealing with XML and DTDs is available somewhere?
    Many Thanks
    Cesare Brizio
    Delta Informatica
    [email protected]

    Thank You for Your indications.
    I will examine the documentation about the XML DEVELOPERS KIT.
    I am not sure whether it works also with FORMS 6i, the elderly release we are still using. Presently, I must evaluate whether a viable FORMS 6i - based solution exists. If this is not the case, we will have to migrate to Forms 9i.
    Thanks.

  • Web-services.xml, dtd or xml schema?

    Hi there!
    I'm just curious to know whether there exists any dtd or schema
    for wls 7.x web-services.xml file?
    The diagram in
    http://e-docs.bea.com/wls/docs70/webserv/wsp.html#1001373
    shows one order for the contents of the web-service element,
    whereas the examples reflect another (being types,
    type-mapping, components, operations).
    Why are the example web-services.xml not tagged with the
    information of the location of the schema?
    Of course building web-services.xml manually is not the first
    thing to try, but since the contents are documented and since
    it gives the best control over the process, it makes sense.

    Hello,
    There's not one. The primary vision for the web-services.xml file
    was/is to be a linkage between wsdl/soap and the j2ee environment. It
    was not intended to be a starting point for building an application, but
    a semi-private intermediary.
    HTHs,
    Bruce
    Toni Nykanen wrote:
    >
    Hi there!
    I'm just curious to know whether there exists any dtd or schema
    for wls 7.x web-services.xml file?
    The diagram in
    http://e-docs.bea.com/wls/docs70/webserv/wsp.html#1001373
    shows one order for the contents of the web-service element,
    whereas the examples reflect another (being types,
    type-mapping, components, operations).
    Why are the example web-services.xml not tagged with the
    information of the location of the schema?
    Of course building web-services.xml manually is not the first
    thing to try, but since the contents are documented and since
    it gives the best control over the process, it makes sense.

  • XML DTD Validation

    Hello,
    In my application I need to perform some XML validation against an DTD file.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE Properties SYSTEM "MyFile.dtd">
    <Properties>
    <Property name="a" value="a1"/>
    </Properties> Both XML file and the DTD are located in the same folder.
    What I need, is to perform the XML validation against the DTD file from another location(more precisely, a DTD located in my application's jar) instead of the DTD from the same folder as XML file.
    The reason for this is because the remote DTD file is most probably outdated.
    This is how I do the validation curentlly:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    builder.setErrorHandler(new org.xml.sax.ErrorHandler()
    Document xmlDocument = builder.parse(destinationXMLFile.toURI().toString());
    DOMSource source = new DOMSource(xmlDocument);
    StreamResult result = new StreamResult(System.out);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer transformer = tf.newTransformer();
    transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "MyFile.dtd");
    transformer.transform(source, result);Someone any idea?
    Thanks,
    johnny

    Unusual but if you need this way your application just must to implement EntityResolver that always points to resource DTD.
    []s

  • Sun's ejb-jar.xml DTD syntax error

    Hi,
    I tried to validate my ejb-jar.xml. When I use IE to open
    the Sun's DTD file: http://www.java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd,
    IE shows me the following message:
    ====
    Invalid at the top level of the document. Line 1, Position 1
    The file named http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd
    ^
    ====
    Could anybody tell me what went wrong?
    Thanks!
    Please respond to [email protected]

    its been renamed to:
    http://java.sun.com/dtd/ejb-jar_2_0.dtd
    this one works in IE 6

  • Import XML/DTD files into iStudio

    I am having Spect Generator files with extension .ecs files
    I need to import these files into iStudio to create commonview. iStudio accepts either XML or DTD formats
    How can I convert these files to XML or DTD files without losing the Structure layout or EDI format ?
    Let me know ASAP.

    Hi,
    I don't know what ".ecs" files are, but it sounds that you may need to create / use D3L dtd's.
    Please look at
    Oracle Application Server InterConnect User’s Guide 10 g (9.0.4)
    Part No. B10404-01
    and especially Appendix B for more information.
    You can download it from
    http://download-east.oracle.com/docs/cd/B10465_01/integrate.904/b10404.pdf

  • A generic XML DTD

    Hi
         I am a newbie to XML and I have a question on XML/Java, hopefully, you guys would be able to give me some pointers to solve this problem.
         Here is the scenario. I need to design (might have to implement as well) a set of Java libraries that can retrieve data (basically, it's some kind of contents, it can be anything, more on this later) and base on the data I retrieved, I would generate a html file (which contains those contents and have the contents displayed).
         Those data (contents) I talked about earlier could be some news item, could be lottery results, could be a travel guide, could be anything. Those data would originally come from a XML file and then store into a database table. (or could just be in a file if there isn't much data). Either way, my programs should be able to read the data from the database/files and somehow "decrypt" it.
         Now, my problem is since the data could contain any kind of data, how do I define a DTD that is so generic that can treat all kinds of contents as the same. By that, I mean, e.g if it was a book review article, it might contain the book's name, the author, the review, the review date...etc, I would imagine that the DTD would contain tags like TITLE, AUTHOR, REVIEW DATE, REVIEW...etc. With all these data, they would be stored into a table, may be just a text field in that table. And then my programs would read from that field and break up those tags and display them accordingly (generate a html file) . But what if it is a lottery result, then the DTD that I defined earlier (for news) would not be applicable for the lottery result content. That means, in order to treat everything as just pure content, I can only have a tag, say content, and for the book review article, this tag would just wrap everything into itself (from the book's name, author....etc) and for the lottery results, the content tag would just contain the numbers. I must say, I have minimal XML knowledge, so please correct me if I am wrong here. But again, how would you define a DTD for such scenario? Is it possible to define such a DTD? Not to mention the style of the contents.......Please, I need help. THx
    ForeverJava
    anywhere else is a better place for XML forums?

    You certainly could water down a DTD to handle all of the different types of events that you are encountering. At this point though the DTD becomes so permissive that it is almost of no use.
    If you are using an XML parser to get at the data it will have to be well-formed. You might as well turn validation off, if the structure is so loose.
    Can you apply a different DTD based on the type of request that is coming back? For example if it's lotto results apply lotto.dtd if it's scores apply scores.dtd, etc.
    You could probably even wrap a root level around the entire document that is consistent and then require one of the data type (lotto, score, etc.) levels next and then proceed.
    Hopefully some of this makes sense-
    -Mike

  • Jazn.xml DTD not available (broken URL)

    In OC4J 9.0.2 production and 9.0.3 preview the file j2ee/home/config/jazn.xml has the following DOCTYPE tag:
    <!DOCTYPE jazn PUBLIC "JAZN Config" "http://xmlns.oracle.com/ias/dtds/jazn.dtd">
    Presently--May 16, 2002--the URL http://xmlns.oracle.com/ias/dtds/jazn.dtd does not exist on Oracle's website. I don't know if it was there before or not, but you better put it there soon!

    Scott,
    Thanks for bringing this to our attention. We'll put it up shortly.
    -Lee

  • OC4J and Local (system) XML DTD files

    I am in a situation where I am deploying a web application to an instance of 10.1.2 that is on a public-facing box that does not have the ability to access the outside world via the web due to security restrictions.
    When I start the application, I'm getting connection refused errors because the XML parser is trying its hardest to validate the XML files for Spring and MyFaces by remotely fetching the DTD file. Is there a way I can get the application to read a local copy of the DTD without having to hard code a full path to the file?
    I've tried changing the doctype declaration for MyFaces to look like this:
    <!DOCTYPE faces-config SYSTEM "web-facesconfig_1_0.dtd">And I put the DTD in the same directory as the XML configuration file (in the WEB-INF directory). Eclipse seems to like that ok, but when I deploy that to 10.1.2, I get the following exception:
    javax.faces.FacesException: java.net.MalformedURLException: no protocol: web-facesconfig_1_0.dtd
         at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:123)
         at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:63)
         at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:46)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1009)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:549)
         at com.evermind.server.Application.getHttpApplication(Application.java:890)
         at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:707)
         at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:625)
         at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:278)
         at com.evermind.server.http.HttpServer.setSites(HttpServer.java:278)
         at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:179)
         at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2394)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1551)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:92)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.net.MalformedURLException: no protocol: web-facesconfig_1_0.dtd
         at java.net.URL.<init>(URL.java:567)
         at java.net.URL.<init>(URL.java:464)
         at java.net.URL.<init>(URL.java:413)
         at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:543)
         at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:468)
         at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:280)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:196)
         at org.apache.commons.digester.Digester.parse(Digester.java:1548)
         at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig(DigesterFacesConfigUnmarshallerImpl.java:183)
         at org.apache.myfaces.config.FacesConfigurator.feedWebAppConfig(FacesConfigurator.java:387)
         at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:120)
         ... 14 moreI've tried variations like ./filename.dtd and ../filename.dtd to no avail. I'm sure I'm missing something fundamental here, but how can I get OC4J to read my local DTD?
    Thanks in advance!

    Avi, you're right, the parser is indeed wanting a real URL. So here's what I've done. I replaced the dtd filename with the complete path to the file, so it looks like this:
    <pre>
    <!DOCTYPE faces-config SYSTEM "file:///C:/path/to/dtd/web-facesconfig_1_0.dtd">
    </pre>
    I deployed, started the app, and it worked. This doesn't really feel like the right solution, however, because I'm going to have to rely on a hardcoded file location for the DTD on our production server. If our admins change that, then I'm out of luck and would have to redeploy the application. Does anyone know if there is a way to get this to be more relative?
    One idea that someone gave me was to put the DTD files in a web-accessible location in the application and reference via http:// instead of file://. At least that way I wouldn't be dependent on the file system. I'd still have to hardcode a URL so I couldn't use the same files for all our development environments, but it might be a slightly cleaner solution. Another possible (yet really ugly) solution is to inline the DTD's in the XML file.
    Asanka, I'm not quite sure I follow what you said. Where would I put such code to use Xerxes? In a servlet loaded on init?
    Thanks for the help so far, everyone.

Maybe you are looking for