dtd

Validating YAML with an XML DTD

冷暖自知 提交于 2020-01-13 18:10:50
问题 I work with a tremendous volume of legacy code on system that requires people of all sorts from other departments with little or no technical experience to have to learn XML (and a rather elaborate set of DTDs) for the digitizing of documents, which then get passed on to some specialized devices designed specifically to use the XML. It occurred to me that YAML or JSON (or something else I haven't heard of at all?) might be far easier on the human authoring end for people who really don't know

How to use saxon built-in catalog feature

别来无恙 提交于 2020-01-11 10:35:29
问题 I downloaded SaxonHE9-4-0-6J and want to process XHTML on CLI. However Saxon tries to load DTD from W3C and it takes too much time for every simple command. I have xml catalog, which I use successfully with xmllint by set env variable pointing to catalog file, but I have no idea how to make Saxon use it. Google reveals whole history of changes (thus confusion) in regards of using catalogs with Saxon, and none made me happy. I downloaded resolver.jar and set it in my CLASSPATH, but I can't

DTD or XML Schema. Which one is better? [closed]

心不动则不痛 提交于 2020-01-09 09:11:10
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . What are the pros / cons in DTD and XML Schemas (I'm not even sure what the official name of the latter is!)? Which is better? Why do we need two ways to do the same thing? Edit: I found this in an article I was reading, which is what prompted me to ask the question: Why W3C

Most common cause of “java.lang.NullPointerException” when dealing with XMLs?

大憨熊 提交于 2020-01-08 03:45:43
问题 My strongest lead is that the code who deals with the incoming XMLs is actually receiving an invalid/incomplete file hence failing the DOM parsing. Any suggestions? 回答1: Incomplete file is definitely the place to start looking. I'd print out the file right before the point you parse it to see what's getting sent to the parser. If it's incomplete it will be obvious. If it's invalid, you'll have a little searching to do. 回答2: My first guess would be that the DOM-using code is treating elements

Is this DTD declaration correctly phrased?

廉价感情. 提交于 2020-01-06 05:57:11
问题 New to XML and DTD, trying to do a homework whereby I was given the DTD but I need to write out the XML content and parse it. <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!ELEMENT ConutryList (CountryReccord) +> <!ATTLIST CountryList xmlns CDATA #FIXED ' '> <!ELEMENT CountryRecord (name,alpha-2,alpha-3,country-code,iso_3166-2,region,sub-region,intermediate-region,region-code,sub-region-code, intermediate-region-code,capital-city,currency,currency-code, population)> <!ATTLIST

Turn off DTD validation for scala.xml.XML [duplicate]

99封情书 提交于 2020-01-05 18:53:32
问题 This question already has answers here : Ignore DTD specification in scala (3 answers) Closed 6 years ago . I want to load an XML document from an InputStream in Scala. Therefore I am using scala.xml.XML.load(is: InputStream): scala.xml.Elem . The XML document is a SVG file that comes from Potrace and looks like this: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg version="1.0" xmlns=

XML format specification (DTD, XSD..) for Unit Test Reports

岁酱吖の 提交于 2020-01-03 08:13:12
问题 A lot of tools produces and consumes the same XML File format for Unit Test report. Example (source): <?xml version="1.0" encoding="UTF-8" ?> <testsuite errors="0" failures="0" hostname="hazelnut.osuosl.org" name="net.cars.engine.MoteurTest" tests="6" time="0.021" timestamp="2007-11-02T23:13:50"> <properties> <property name="java.vendor" value="IBM Corporation" /> <property name="os.name" value="Linux" /> <!-- more property tags--> </properties> <testcase classname="net.cars.engine.MoteurTest

XHTML 1.1 validation error: “Parameter entity 'xhtml-inlstyle.mod' references itself”

不羁的心 提交于 2020-01-03 05:43:17
问题 Hey I try to validate my html page with official dtd : MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(MessageBody)); ms.Position = 0; XmlReaderSettings settingsReader = new XmlReaderSettings(); settingsReader.DtdProcessing = DtdProcessing.Parse; settingsReader.ValidationType = ValidationType.DTD; MyUrlResolver resolver = new MyUrlResolver(); settingsReader.XmlResolver = resolver; XmlReader reader = XmlReader.Create(ms, settingsReader); while(reader.Read()){} and custom

Dtd validation with libxml2

时间秒杀一切 提交于 2020-01-03 04:16:23
问题 how do i do dtd validation with libxml2? i am reading my xml file using the reader api. i have an external dtd validation file. how do i perform the validation itself? do i have to convert it to xsd? 回答1: Use xmlValidateDtd api, as described in FAQ, point 11. This function is used by xmllint application, when --dtdvalid is supplied. See the source file, xmllint.c, parseAndPrintFile function. Search for xmlValidateDtd , it's used only once now. 回答2: If your are using python as your programming

How can I ignore DTD validation but keep the Doctype when writing an XML file?

不羁的心 提交于 2020-01-02 08:34:16
问题 I am working on a system that should be able to read any (or at least, any well-formed) XML file, manipulate a few nodes and write them back into that same file. I want my code to be as generic as possible and I don't want hardcoded references to Schema/Doctype information anywhere in my code. The doctype information is in the source document, I want to keep exactly that doctype information and not provide it again from within my code. If a document has no DocType, I won't add one. I do not