dtd

No grammar constraints (DTD or XML schema) detected for the document

邮差的信 提交于 2019-11-26 06:58:46
问题 I have this dtd : http://fast-code.sourceforge.net/template.dtd But when I include in an xml I get the warning : No grammar constraints (DTD or XML schema) detected for the document. The xml is : <?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE templates PUBLIC \"//UNKNOWN/\" \"http://fast-code.sourceforge.net/template.dtd\"> <templates> <template type=\"INSTANCE_OF_CLASS\"> <description>Used to Create instance of class</description> <variation>asasa</variation> <variation-field>asasa<

Where is the HTML5 Document Type Definition?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 06:35:26
问题 The \"old\" HTML/XHTML standards have a DTD (Document Type Definition) defined for them: HTML 4.01 http://www.w3.org/TR/html401/sgml/dtd.html XHTML 1.0 http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict This DTDs specify the rules for nesting elements - \"which types of elements may appear in which types of elements\". I made a diagram for XHTML 1.0 here (sorry, I no longer have that resource) I would like to update that diagram with a new version which also includes the new HTML5

External referenced DTD in XML

霸气de小男生 提交于 2019-11-26 05:39:14
问题 test.xml: <?xml version=\'1.0\' encoding=\'UTF-8\'?> <!DOCTYPE email SYSTEM \"test.dtd\"> <email> <von>test@test.com</von> <zu>xxx@example.com</zu> <titel>Hello</titel> <text>Dear John....;-).</text> <prior type=\"schnell\"/> </email> test.dtd: <?xml version=\'1.0\' encoding=\'UTF-8\'?> <!DOCTYPE email [ <!ELEMENT email (von,zu,titel,text,prior)> <!ELEMENT von (#PCDATA)> <!ELEMENT zu (#PCDATA)> <!ELEMENT titel (#PCDATA)> <!ELEMENT text (#PCDATA)> <!ATTLIST prior type CDATA #REQUIRED > ]>

Why are nested anchor tags illegal?

筅森魡賤 提交于 2019-11-26 01:40:13
问题 I learned that nesting anchor tags is not standards compliant HTML. From W3: Links and anchors defined by the A element must not be nested; an A element must not contain any other A elements. Since the DTD defines the LINK element to be empty, LINK elements may not be nested either. It would seem like alternatives such as those suggested in the selected answer in this question would have more of a chance of creating unexpected behavior than simply nesting the anchors would! It also seems like

How to generate sample XML documents from their DTD or XSD?

混江龙づ霸主 提交于 2019-11-26 01:26:29
问题 We are developing an application that involves a substantial amount of XML transformations. We do not have any proper input test data per se, only DTD or XSD files. We\'d like to generate our test data ourselves from these files. Is there an easy/free way to do that? Edit There are apparently no free tools for this, and I agree that OxygenXML is one of the best tools for this. 回答1: I think Oxygen (http://www.oxygenxml.com/) does it as well, but that's another commerical product. It's a nice

Make DocumentBuilder.parse ignore DTD references

≯℡__Kan透↙ 提交于 2019-11-26 01:22:17
When I parse my xml file (variable f) in this method, I get an error C:\Documents and Settings\joe\Desktop\aicpcudev\OnlineModule\map.dtd (The system cannot find the path specified) I know I do not have the dtd, nor do I need it. How can I parse this File object into a Document object while ignoring DTD reference errors? private static Document getDoc(File f, String docId) throws Exception{ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(f); return doc; } toolkit A similar approach to the one suggested by

Make DocumentBuilder.parse ignore DTD references

一个人想着一个人 提交于 2019-11-26 01:07:19
问题 When I parse my xml file (variable f) in this method, I get an error C:\\Documents and Settings\\joe\\Desktop\\aicpcudev\\OnlineModule\\map.dtd (The system cannot find the path specified) I know I do not have the dtd, nor do I need it. How can I parse this File object into a Document object while ignoring DTD reference errors? private static Document getDoc(File f, String docId) throws Exception{ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf

What is DOCTYPE?

瘦欲@ 提交于 2019-11-25 23:44:15
问题 What is DOCTYPE and why do I want to use it? What are the different DOCTYPEs I can use? What is the difference between standards and quirks mode, and what are some quirks I may run into with differently set DOCTYPEs? Lastly, what is the proper DOCTYPE that I should be using? 回答1: Basically, the DOCTYPE describes the HTML that will be used in your page. Browsers also use the DOCTYPE to determine how to render a page. Not including a DOCTYPE or including an incorrect DOCTYPE can trigger quirks

Is there any difference between &#39;valid xml&#39; and &#39;well formed xml&#39;?

邮差的信 提交于 2019-11-25 21:41:43
问题 I wasn\'t aware of a difference, but a coworker says there is, although he can\'t back it up. What\'s the difference if any? 回答1: There is a difference, yes. XML that adheres to the XML standard is considered well formed, while xml that adheres to a DTD is considered valid. 回答2: Valid XML is XML that succeeds validation against a DTD. Well formed XML is XML that has all tags closed in the proper order and, if it has a declaration, it has it first thing in the file with the proper attributes.