dtd

Extending XHTML

 ̄綄美尐妖づ 提交于 2019-12-18 11:33:28
问题 I'm playing around with writing a jQuery plugin that uses an attribute to define form validation behavior (yes, I'm aware there's already a validation plugin; this is as much a learning exercise as something I'll be using). Ideally, I'd like to have something like this: Example 1 - input: <input id="name" type="text" v:onvalidate="return this.value.length > 0;" /> Example 2 - wrapper: <div v:onvalidate="return $(this).find('[value]').length > 0;"> <input id="field1" type="text" /> <input id=

xmllint DTD validation syntax

爱⌒轻易说出口 提交于 2019-12-18 11:15:09
问题 Trying to validate an XML document; however, xmllint is insisting on reading the options as the file so I'm getting FileNotFound exceptions. Just to confirm, I have the xmllint.exe in the same folder as my XML file. I locate the directory in CMD and enter the command: xmllint --noout --valid file.xml The DTD is located within the xml file. However, xmllint is looking for the file ~/--nout . I have tried putting the file before the options, however, the options are then not applied. I'm

Disable DTD warning for Ant scripts in Eclipse?

你离开我真会死。 提交于 2019-12-18 10:58:18
问题 I'm using Eclipse Ganymede. Everything works fine, but I have an anal-retentive yearning for a warning-free Problems tab. Right now it (correctly) complains about my Ant scripts: "No grammar constraints (DTD or XML schema) detected for the document." Is there any way to turn that off for just those files? Ideally I'd like it to still warn me if my other schema-constrained files were missing the schema declarations. 回答1: The simplest is to supply a minimal DTD to shut it up. <!DOCTYPE project>

XML schema or DTD for logback.xml?

感情迁移 提交于 2019-12-18 10:16:10
问题 I've seen several discussions on the net about how great it would be to have an XML schema or DTD for logback.xml file to have at least the very basic validation and auto-completion in IDEs like IDEA or Eclipse, but I never saw any solution. Did you? 回答1: It is not supported officially according to the documentation, but there is an independent project to provide Schema for Logback However, due to extreme flexibility of the Logback configuration, Schema cannot support all possible

Parsing an XML file with a DTD schema on a relative path

断了今生、忘了曾经 提交于 2019-12-18 04:47:05
问题 I have the following java code: DocumentBuilder db=DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc=db.parse(new File("/opt/myfile")); And /opt/myfile contains something like: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE archive SYSTEM "../../schema/xml/schema.dtd"> ... I get the following error: java.io.FileNotFoundException: /../schema/xml/schema.dtd (No such file or directory) This is a large java framework that consumes an XML file produced elsewhere. I think

DTD download error while parsing XHTML document in XOM

拈花ヽ惹草 提交于 2019-12-18 04:18:09
问题 I am trying to parse an HTML document with the doctype declared to use the transitional dtd as follows: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> When I do Builder.build on the document, I get the following exception: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd at sun.net.www.protocol.http.HttpURLConnection.getInputStream

Where are the schemas for XML files on an Android project?

对着背影说爱祢 提交于 2019-12-17 15:46:53
问题 Where are the schemas (DTD or XML schema) for the XML files used on Android like AndroidManifest.xml or the layouts? 回答1: The schemas don't exist as an xml file. Schemas are dependent upon what UI classes your program uses. There's a slightly better discussion here. 回答2: Generally, defining a namespace in XML doesn't has to be a real existing URL but just a world wide unique String (therefore one prefers using their own URLs). Of course, it's nice if this URL contains the XML-schema (or worse

How do I define HTML entity references inside a valid XML document?

风流意气都作罢 提交于 2019-12-17 07:31:50
问题 I need to be able to reference named HTML entities like • instead of the Unicode alternative • in an XML document. I have control over some parts of the XML document, such as defining the DOCTYPE , but doing a find-and-replace in the actual XML is not an option. I can get some elements like   and & by including the XHTML transitional DOCTYPE, but I need to define more manually. How do I do this? -- EDIT -- Thanks to Jim's answer, here's what I ended up with. This is great because I can

How to load an XHTML file into an XElement using a custom XmlUrlResolver?

人盡茶涼 提交于 2019-12-14 04:25:51
问题 I am trying to get an XHTML file loaded into an LINQ XElement. However, I am running into problems with the resolver. The problem has to do with the following definition: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> I have a custom XmlUrlResolver with an overridden GetEntity which converts links such as http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd to a local resource stream. This works fine for almost the

Options in a DTD

天大地大妈咪最大 提交于 2019-12-14 03:22:42
问题 I am editing my last post with a whole new question about the same assignment. I ended up submitting my assignment and the professor said it had a lot of errors. So I have been working on it for the past few weeks and am stuck in my current situation. My DTD comes up with absolutely no errors. However, my XML document comes up with errors to every element that I had to make options for, For example genre, movie rating, and viewer rating. The errors are: Attribute "genre" is required and must