DW Validator XHTML Transitional DTD

If i am using the validator XHTML 1.0 Transitional as my
validation. Is the DTD file it is using located somewhere in DW's
configuration folders? If so, does anyone know where it is?
i see that under tagLibraries\Validator\ there is the
XHTML10t.vtv file, but that is not the actual DTD.

> is there any reason not to use XHTML 1.0 Strict?
No. If your skill can support the use of this doctype, it's
fine to use.
> Would this interfere with validation?
No.
> Is there any way to change the
> DOCTYPE for pages I have already started?
In CS3, use FILE | Convert ...
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Daylilybud" <[email protected]> wrote in
message
news:frlanb$ec$[email protected]..
>I am working on my first site with DW 8. I took a couple
of classes and
>have
> been learning as much as I can about HTML and CSS. When
choosing the
> DOCTYPE,
> is there any reason not to use XHTML 1.0 Strict? As far
as I can tell,
> people
> seem to mostly use XHTML 1.0 Transitional (or an earlier
version). I'd
> appreciate a little more explanation about why
Transitional XHTML is used
> instead of Strict. I've been reading about problems with
boxes in IE 5.5
> that
> can be fixed using conditional comments which would
include some extra CSS
> code
> (* html). Would this interfere with validation? Is there
any way to change
> the
> DOCTYPE for pages I have already started?
>

Similar Messages

  • JSF and XHTML Transitional validation

    We're finishing our first public-facing JSF project and our final hurdle is to make sure our pages are XHTML compliant (we're a government department and we have to fall in line); we've chosen XHTML 1.0 Transitional.
    We have two problems:
    1. When we use <h:commandLink ...> the inserted javascript is not escaped and produces the validation errors using the W3C validator:
    Warning Line 87 column 121: character "<" is the first character of a delimiter but occurred as data.
    ...p;if (adp != null) {for (var i = 0;i < adp.length;i++) {f.removeChild(adp)
    Warning Line 87 column 270: character "<" is the first character of a delimiter but occurred as data.
    ...p.split(',');for (var i = 0,ii = 0;i < ps.length;i++,ii++) {var p = document.
    [/code]
    Is this a known problem, and is there a solution? A last resort could be to use a ServletFilter to insert <[CDATA[ ]]> into the page, around the javascript.
    2. Multiple forms produce multiple hidden input tags with the same ID:
    Error Line 106 column 54: ID "javax.faces.ViewState" already defined.
    ...en" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id114:j_As far as I can see we're going to have to re-design our pages to use just one form (we have two navigation menus each with their own form, then one form for the page.)
    Unless there is another solution?
    We're using Sun JSF RI 1.2_03-b09-FCS (with facelets), but observe the same behaviour with 1.2_04.
    Many thanks for any help,
    Andy.

    I have encountered the same issue. Hard-coded "javax.faces.ViewState" is a design bug in my view. subviews make absolutely no sense when view state id is hard-coded. It has to be auto-generated just as it's values are, even though that may require iteration thru the params. One way to deal w/ this to avoid iteration thru params in JSF impl, is to append subview id "javax.faces.ViewState" hidden field, have each subview look up accordingly. There is no other way to have valid XHTML.
    If there's a work-around, please share.
    Thanks,
    Reshat.

  • Regarding validating XML against DTD

    hello,
    In my project I am receiving xml via HTTP post request
    and this XML needs to be validated against a DTD in a remote server.
    e.g. assume the xml to be
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE PUSH SYSTEM "http:\\whatever:xx\whatever\sms.dtd">
    <PUSH ICP="Partenaire" ADM="UtilisateurChezPartenaire" VERSION="1.0">
    </PUSH>
    the java code uses Xerces parser
          DOMParser parser = new DOMParser();
          parser.setFeature("http://xml.org/sax/features/validation", true);
          parser.setProperty(
                             "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
                             "http:\\whatever:xx\whatever\sms.dtd"");
          parser.parse("c://localcopy/sms.xml");this Works fine.
    But in some case I receive xml file without any !DOCTYPE declaration
    (but is still needs to be validated against the same DTD as its mentioned in the business rules)
    in such case how can the XML be validated against the DTD.
    am I extected to add the
    <!DOCTYPE PUSH SYSTEM "http:\\whatever:xx\whatever\sms.dtd">
    to every XML via some XSLT script or is there a direct way of
    validating a xml that has no DOCTYPE reference to a DTD
    (the assumption is the DTD location is known beforehand)

    ok, i managed to solve the problem my self, using Transformer makes the job easier.
    here is the code for anyone who might run into the same problem.#
         public void whatEver(){
              try{
                   DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
                   DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
                   Document xmlDocument = dBuilder.parse(new FileInputStream("c://a.xml"));
                   DOMSource source = new DOMSource(xmlDocument);
                   //StringWriter writer = new StringWriter();
                   StreamResult result = new StreamResult("c://a.xml");
                   TransformerFactory tf = TransformerFactory.newInstance();
                   Transformer transformer = tf.newTransformer();
                   transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "./transformations/Push_Gateway.dtd");
                   //TransformerFactory transformerFactory = TransformerFactory.newInstance();
                   //Transformer newtransformer = transformerFactory.newTransformer();
                   transformer.transform(source, result);
              catch(Exception e){
                   e.printStackTrace();
         }the above code reads the a.xml file and adds/removes the DOCTYPE as specified in the transformer.setOutputProperty method and the same xml file is updated, this way different DTD could be referenced by the same xml and validated. this saves the process of adding/removing DOCTYPE via xslt.

  • Need help creating valid XHTML statement

    Hi -
    This is for a homework assignment that requires valid XHTML (I have to validate the dynamically generated HTML). Everything is great with the servlet except the statements where I "echo" the user input.
    The user inputs several values (loan calculator servlet), hits submit and if the values are valid inputs, the servlet returns the amount of the monthly payment. It also displays the inputs in case the user wants to change one of them (loan amount, interest rate or term of the loan).
    The servlet output is fine but my problem is in validating the html. The W3C validator shows an error on the lines where I'm echoing the original inputs.
    Here's my code that generates the html:
    out.println("<td><input type=\"text\" name=\"amount\" value=" + amount + "><br/></td>");Here's the html line that is output:
    <td><input type="text" name="amount" value=783745.43><br/></td>For this to be valid XHTML, the value needs to be in quotes. For example, that parameter should be value="783745.43".
    This is the error that the validator produces:
    Error Line 16 column 43: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
    <td><input type="text" name="amount" value=783745.43><br/></td>The 'shorttag' and 'omittag' make no sense to me; I haven't found a decent reference yet on how to use them.
    I've tried multiple combinations of escape sequences but have had no success. Can anybody point out what I'm overlooking?
    Thanks in advance.

    I have understand about the SQL statement.
    My problem is like this. I have 3 variable. I have a table with 3 field.
    How can I use those variable to reftrieve value from my select statement?
    How can I use those variable to send value to my update or insert statement?
    sample statement:
    - select F1, F2, F3 from T where F1 = V1
    - insert into F1, F2, F3 values(V1, V2, V3)
    please help, I'm working on my final project in college.
    Thanks before.
    "Sweet devil is still as sweet as ever..."

  • Page not valid XHTML 1.0 Transitional?

    Okay,
    So I've been having problems (go fig) with my page displaying properly in the Firefox browser on my account. My site displays fine on my account in Safari. If I switch accounts, the site will display better (not perfectly) in Firefox. On my windows machine, my site displays fine in all three of my browsers, IE, Firefox, and Safari.
    Here is a link to my site: kevin morehouse
    The page that displays incorrectly is the "About Us" page.
    I went to the Mozilla website and found a link to http://validator.w3.org/
    This is what came back when I ran my URL
    Validation Output: 4 Errors
    Line 224, Column 202: there is no attribute "allowTransparency".
    …0" marginwidth="0" allowTransparency="true"></iframe>

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
    Line 255, Column 260: cannot generate system identifier for general entity "counter".
    …7-B031088E2D79?webdav-method=propget&counter"></script><

    An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".
    Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and æ are different characters.
    If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.
    Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.
    Line 255, Column 260: general entity "counter" not defined and no default entity.
    …7-B031088E2D79?webdav-method=propget&counter"></script><

    This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
    Line 255, Column 267: reference not terminated by REFC delimiter.
    …88E2D79?webdav-method=propget&counter"></script><img src

    If you meant to include an entity that starts with "&", then you should terminate it with ";". Another reason for this error message is that you inadvertently created an entity by failing to escape an "&" character just before this text.
    Line 255, Column 267: reference to external entity in attribute value.
    …88E2D79?webdav-method=propget&counter"></script><img src

    This is generally the sign of an ampersand that was not properly escaped for inclusion in an attribute, in a href for example. You will need to escape all instances of '&' into '&'.
    Line 255, Column 267: reference to entity "counter" for which no system identifier could be generated.
    …88E2D79?webdav-method=propget&counter"></script>
    </script>
    Line 255, Column > 80: XML Parsing Error: EntityRef: expecting ';'.
    …pe="text/javascript" src="http://web.mac.com/i/chp/NGHitCounter.js"></script>…
    Message was edited by: kevin morehouse

    I am VERY concerned with the fact that my pages are not being properly validated and displayed.
    I have created two different sites using iWeb '08 and while I am satisfied with the ease of use, I am concerned that my sites are not being displayed correctly... in fact, the other day my friend who is a Mac whiz and who hosts my business website on his server... tried to visit the site that I created using iWeb '08 and had published to my .Mac account... it caused his browser to flat out crash! He said he hasn't seen anything like that in years!
    Here is the site I have begun to build http://www.mcleanmonowheel.com
    If you paste this url into http://validator.w3.org/ a slew of errors pop up.
    Is this the norm with iWeb or have I done something wrong on my end???
    -Patrick

  • Doctype -- XHTML Transitional or Strict?

    I am working on my first site with DW 8. I took a couple of
    classes and have been learning as much as I can about HTML and CSS.
    When choosing the DOCTYPE, is there any reason not to use XHTML 1.0
    Strict? As far as I can tell, people seem to mostly use XHTML 1.0
    Transitional (or an earlier version). I'd appreciate a little more
    explanation about why Transitional XHTML is used instead of Strict.
    I've been reading about problems with boxes in IE 5.5 that can be
    fixed using conditional comments which would include some extra CSS
    code (* html). Would this interfere with validation? Is there any
    way to change the DOCTYPE for pages I have already started?

    > is there any reason not to use XHTML 1.0 Strict?
    No. If your skill can support the use of this doctype, it's
    fine to use.
    > Would this interfere with validation?
    No.
    > Is there any way to change the
    > DOCTYPE for pages I have already started?
    In CS3, use FILE | Convert ...
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Daylilybud" <[email protected]> wrote in
    message
    news:frlanb$ec$[email protected]..
    >I am working on my first site with DW 8. I took a couple
    of classes and
    >have
    > been learning as much as I can about HTML and CSS. When
    choosing the
    > DOCTYPE,
    > is there any reason not to use XHTML 1.0 Strict? As far
    as I can tell,
    > people
    > seem to mostly use XHTML 1.0 Transitional (or an earlier
    version). I'd
    > appreciate a little more explanation about why
    Transitional XHTML is used
    > instead of Strict. I've been reading about problems with
    boxes in IE 5.5
    > that
    > can be fixed using conditional comments which would
    include some extra CSS
    > code
    > (* html). Would this interfere with validation? Is there
    any way to change
    > the
    > DOCTYPE for pages I have already started?
    >

  • XML Validation using custom DTD file

    Well, I thought that my problem is about to be a trivial one, but now, I don't think so. I have to develop XML-based protocol over HTTP. XML Document doesn't contain any reference to DTD, but I have some DTDs. I want to validate my XML messages in real time and I want to find some library that allows to do something like that:
    SomeXmlValidatingParser s = new SomeXmlValidatingParser(InputStream dtdFileStream);
    for(;;)
        InputStream is = message.recive();
        DocumentObject = s.parseAndValidate(is);
    }So, the issue is to pass my custom DTD file (it is already loaded to memory) into validating parser.
    So, which library have such functionality? And if there are some, could you be so kind to advice some of them?

    Well, I've just realized that JDK 1.5 has standard way to validate XMLs using XSD schemas. Ok. But look at the sample
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="http://www.w3.org/2001/xml.xsd" />
      <xs:element name="birthdate">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="month" type="xs:string" />
            <xs:element name="day" type="xs:int" />
            <xs:element name="year" type="xs:int" />
          </xs:sequence> 
        </xs:complexType>
      </xs:element>
    </xs:schema>Every time I process this schema, it goes to w3c.org... And I wonder if it cause some problems if I delete
      <xs:import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="http://www.w3.org/2001/xml.xsd" />

  • Validating XML Against DTD

    I'm relatively new to Java and I was just wondering what is the most effective way of comparing an XML document to its DTD to ensure the document is valid.
    Any advice would be appreciated.

    Thanks for the example but looks like SUN code is buggy when compiled?
    The method parse(InputStream, HandlerBase) in the type SAXParser is not applicable for the arguments (File, DefaultHandler)

  • Problem with Struts Validation and apache dtd definition.

    Jakarta Struts
    Java Version 1.5
    We have one web application that is being a little problematic, on startup two errors are thrown relating to the same problem (errors below).
    We get 401 returned for http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
    both the validation.xml and validation-rules.xml have the same doc type set as below:
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    We have the same configuration set for several other web application deployed succesfuly on the same tomcat application server without any problems. I'm not sure why this one application is causing a problem, I don't see any difference between the validation.xml and validation-rules.xml files in this application to any of the others that have been succesfully deployed, infact the validation-rules.xml is identical for all the web applications hosted on this server.
    Any ideas appreciated
    Error
    2006-03-30 15:04:50,968 ERROR [HttpRequestHandler-169] validator.ValidatorPlugIn (ValidatorPlugIn.java:224) - Server returned HTTP response code: 401 for URL: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
    java.io.IOException: Server returned HTTP response code: 401 for URL: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:791)
         at java.net.URL.openStream(URL.java)
         at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2292)
         at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:265)
         at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:540)
         at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:465)
         at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:298)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:277)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:184)
         at org.apache.commons.digester.Digester.parse(Digester.java:1515)
         at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(Unknown Source)
         at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:222)
         at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:161)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
         at javax.servlet.GenericServlet.init(GenericServlet.java:259)
         at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2141)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4582)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4676)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:820)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:542)
         at com.evermind.server.Application.getHttpApplication(Application.java:889)
         at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:690)
         at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:420)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:422)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    2006-03-30 15:04:50,968 INFO [HttpRequestHandler-169] validator.ValidatorPlugIn (ValidatorPlugIn.java:209) - Loading validation rules file from '/WEB-INF/validation.xml'
    2006-03-30 15:04:50,984 ERROR [HttpRequestHandler-169] validator.ValidatorPlugIn (ValidatorPlugIn.java:224) - Server returned HTTP response code: 401 for URL: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
    java.io.IOException: Server returned HTTP response code: 401 for URL: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:791)
         at java.net.URL.openStream(URL.java)
         at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2292)
         at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:265)
         at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:540)
         at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:465)
         at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:298)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:277)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:184)
         at org.apache.commons.digester.Digester.parse(Digester.java:1515)
         at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(Unknown Source)
         at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:222)
         at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:161)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
         at javax.servlet.GenericServlet.init(GenericServlet.java:259)
         at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2141)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4582)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4676)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:820)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:542)
         at com.evermind.server.Application.getHttpApplication(Application.java:889)
         at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:690)
         at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:420)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:422)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    -----------------------------------------------------------------------

    hi,
    I am also facing the same issue. Could you tell me which are those jar files you were missing & from where you got those?
    regards
    prasanth

  • Strange problem when validating XML agains DTD file.

    Dear experts,
    I'm write a simple code snippet that validates my XML file agains a given DTD.
    It allways report the following error:
    org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
         at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)Althought, my xml file is OK with Xmlspy.
    My code is:
    System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
                             "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
          DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
          factory.setNamespaceAware(true);
          factory.setValidating(true);
          factory.setAttribute(
              "http://java.sun.com/xml/jaxp/properties/schemaLanguage",
              "http://www.w3.org/2001/XMLSchema");
          factory.setAttribute(
              "http://java.sun.com/xml/jaxp/properties/schemaSource", SchemaUrl);
          DocumentBuilder builder = factory.newDocumentBuilder();
          Validator handler = new Validator();
          builder.setErrorHandler(handler);
          builder.parse(new java.io.FileInputStream(new java.io.File(XmlDocumentUrl)));And here are the xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE capsule SYSTEM "c:/SampleFiles/capsule.dtd">
    <capsule>
         <header>
              <name>Capsule 1</name>
              <author>Author</author>
              <company>Company</company>
              <last-save-time>Fri Apr 01 14:59:21 GMT+07:00 2005</last-save-time>
              <description>description</description>
         </header>
         <datasets>
              <dataset type="input">
                   <name>dataset1</name>
                   <description></description>
                   <columns>
                        <column type="fromsource">
                             <name>partno</name>
                             <data-type>varchar</data-type>
                             <length>80</length>
                             <precision/>
                             <scale/>
                             <allow-null>false</allow-null>
                             <default-value/>
                        </column>
                        <column type="notfromsource">
                             <name>balanceonhand</name>
                             <data-type>integer</data-type>
                             <length/>
                             <precision/>
                             <scale/>
                             <allow-null>false</allow-null>
                             <default-value/>
                        </column>
                   </columns>
                   <rule>LET a=update; LET b=employye set salary = 100; print a + b</rule>
                   <!--output: update employee set salary = 100-->
                   <command>inmemory (getvalue_dataset("dataset1".rule))</command>
                   <params>
                        <param>
                             <name/>
                             <type/>
                        </param>
                   </params>
              </dataset>
         </datasets>
    </capsule>What I can do now? Change my xml file?
    Please provide some hints.
    Thanks in advance.

    I tried to remove the DOCTYPE, but the problem stayed the same.
    Thanks.

  • Validating against a DTD specified externally

    Hi all,
    I don't know if this is possible (well anything is possible):
    I would like to validate an XML file from a DTD that I specify. The problem that I have is that the XML is generated by an external system and it can be deployed either on a unix or windows architecture.
    I load the XML from file located on either architecture and I want to control the location on either system where the DTD is kept and if possible tell the validator what DTD to use. I am having problems using relative paths when specifying the DTD in the XML and the company doesn't want to use an external public URI.
    I am using Java 1.4 and SAX 2.0 . Any pointers or help would be very much appreciated [code is even better ;-)]

    Hi,
    I cant seem to make the EntityResolver work properly. I was tasked to validate a lot of XML files but they do not have a DOCTYPE entity because the location of the dtd is configurable.
    i have stripped down the xml to only contain the root for brevity of testing but i am still stuck. the xml is this:
    <?xml version="1.0" encoding="utf-8"?>
    <ngui full="f" r="f">
    </ngui>and my validation code is this
    public class SimpleXMLValidator {
      public boolean validate(String xmlFilePath, String schemaFilePath){
            boolean validXML = true;
            System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
                               "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setNamespaceAware(true);
            factory.setValidating(true);
            //factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
                                          "http://www.w3.org/2001/XMLSchema" );
            //factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource",schemaFilePath);
            try {
                DocumentBuilder builder = factory.newDocumentBuilder();
                ExternalResolver er = new ExternalResolver();
                er.addURL(schemaFilePath);
                builder.setEntityResolver(er);
                builder.parse(new File(xmlFilePath));
            } catch (ParserConfigurationException e) {
                validXML = false;
                e.printStackTrace();
            } catch (SAXException e) {
                validXML = false;
                e.printStackTrace();
            } catch (IOException e) {
                validXML = false;
                e.printStackTrace();
            return validXML;
       private class ExternalResolver implements EntityResolver{
            private HashMap urlMap = null;
            public InputSource resolveEntity(String publicId, String systemId){
                System.out.println("resolvedEntity:" +publicId +" and "+systemId);
                if ( urlMap != null && urlMap.get(systemId)!= null ){
                    try {
                        return new InputSource(new FileReader(systemId));
                    } catch (FileNotFoundException e) {
                        System.out.println("[ERROR] Unable to load entity reference: " + systemId );
                return null;
            public void addURL(String filePath) throws MalformedURLException{
                addURL(new File(filePath).toURL());
            public void addURL(URL url) {
                if ( urlMap == null ){
                    urlMap = new HashMap();
                urlMap.put(url, null);
    }If I hardcode the DOCTYPE then the file passes through the validation. and printout the System.out that I placed in the entity resolver. However I am getting the following exceptions:
    * if I remove the hard-coded DOCTYPE (notice that the EntityResolver output line is not written)
    C:\APPS\Eclipse-ws\testbed\bin>java SimpleXMLValidator ..\testdata\ac3.xml  ..\testdata\ngui.dtd
    Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
    set, which is probably not what is desired.  Parser will use a default
    ErrorHandler to print the first 10 errors.  Please call
    the 'setErrorHandler' method to fix this.
    Error: URI=file:C:/APPS/Eclipse-ws/testbed/bin/../testdata/ac3.xml Line=2: Document is invalid: no grammar found.
    Error: URI=file:C:/APPS/Eclipse-ws/testbed/bin/../testdata/ac3.xml Line=2: Document root element "ngui", must match DOCTYPE root "null".* if I uncomment the setAttribute calls:
    C:\APPS\Eclipse-ws\testbed\bin>java SimpleXMLValidator ..\testdata\ac3.xml  ..\testdata\ngui.dtd
    resolvedEntity:null and file:C:/APPS/Eclipse-ws/testbed/testdata/ngui.dtd
    org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
            at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
            at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
            at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
            at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
            at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
            at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
            at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
            at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
            at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
            at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
            at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
            at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
            at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
            at SimpleXMLValidator.validate(SimpleXMLValidator.java:61)
            at SimpleXMLValidator.main(SimpleXMLValidator.java:40)* the setAttributes is still active in the compiled class but this time I hardcoded the DOCTYPE again.
    C:\APPS\Eclipse-ws\testbed\bin>java SimpleXMLValidator ..\testdata\ac3.xml  ..\testdata\ngui.dtd
    resolvedEntity:null and file:C:/APPS/Eclipse-ws/testbed/testdata/ngui.dtd
    resolvedEntity:null and file:C:/APPS/Eclipse-ws/testbed/testdata/ngui.dtd
    org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
            at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
            at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
            at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
            at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
            at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
            at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
            at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
            at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
            at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
            at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
            at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
            at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
            at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
            at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
            at SimpleXMLValidator.validate(SimpleXMLValidator.java:61)
            at SimpleXMLValidator.main(SimpleXMLValidator.java:40)does anybody know what I am missing here? Thanks.
    ciao!
    [edit] This posting of mine looks horrible both on IE and Firefox because its HTML tags are all in the text. I posted this question in http://ramfree17.org/capsule/?p=38 which is hopefully more readable.

  • Validating xhtml made by coldfusion

    Hello there,
    I have problems validating the my Cold Fusion pages with the
    xhtml. Cold Fusion is inserting the javascript code (see below)
    ahead of the page header, as results the xhtml validation cannot
    find the DOCTYPE. The javascript is coming from the session
    variables that I created to manage login/out.
    I would like to know how can I force ColdFusion to insert the
    code below the xhtml header?

    On both CF8 and CFMX7.0.2 it sticks its script in the
    <head> block for me.
    And it all validates as XHTML.
    It might help if you post your code rather than (some of ~)
    the output of
    your code.
    Adam

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

  • Got exception when validating against a DTD

    We are using the XML Parser for Java v2.
    We created an instance of DOMParser, called parseDTD with a valid dtd file and called getDocType to obtain a handle to the DTD object.
    Then, we created a SAXParser and called setDocType(myDTD), where myDTD in the step above and called setValidationMode(true)
    We then use the SAXParser instance to parse an XML document that contains errors and we got the following exception:
    java.lang.ArrayIndexOutOfBoundsException: 101
    at oracle.xml.parser.v2.XMLError.error(XMLError.java:103)
    at oracle.xml.parser.v2.XMLError.error(XMLError.java:152)
    at oracle.xml.parser.v2.ValidatingParser.pushState(ValidatingParser.java:786)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:913)
    at oracle.xml.parser.v2.ValidatingParser.parseRootElement(ValidatingParser.java:98)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:201)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:106)
    We don't get this exception if we use small files. We only get this if we use slightly larger files (>10000 lines)
    What is causing this exception? Any work arounds? Thanks.

    Was my fault. It worked fine !!
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by R|diger Brand ([email protected]):
    Hello,
    what do I have to do if I want to validate a XML file against a DTD ?
    I use cpp-Version for NT and have set the flags, but I didn't get an error-message for a wrong xml-file ?!<HR></BLOCKQUOTE>
    null

  • Why isn't my page validating XHTML compatible?

    If you run my website I'm building through an XHTML validator
    it brings up one error and I don't understand why it brings up this
    error since all of my XHTML seems to validate fine...
    XHTML
    Validation Results

    You cannot have a <form> tag inside a <p>
    paragraph.
    <p align="center">
    <form action="
    http://app.icontact.com/icp/signup.php"
    method="post"
    name="icpsignup" target="_blank" accept-charset="UTF-8"
    onsubmit="return
    verifyRequired();pageTracker._linkByPost(this)">
    <input type="hidden" name="redirect"
    value="
    http://dev.thinktecmediagroup.com/thank-you.php"
    />
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Chris Jumonville" <[email protected]> wrote
    in message
    news:gnko91$728$[email protected]..
    > If you run my website I'm building through an XHTML
    validator it brings up
    > one
    > error and I don't understand why it brings up this error
    since all of my
    > XHTML
    > seems to validate fine...
    >
    >
    >
    >
    http://validator.w3.org/check?uri=http%3A%2F%2Fdev.thinktecmediagroup.com%2F&cha
    >
    rset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%
    > 2F1.606
    >

Maybe you are looking for