dtd

How can I determine if a given DTD a subset of another?

不羁的心 提交于 2019-12-24 16:05:15
问题 I need to verify that a "simplified" DTD is really a subset of a larger DTD, I.e. that documents that are valid according to the "simplified" DTD will also always be valid according to the larger (or "master") DTD. The simplified DTD is being written now -- it's derived from the master DTD (were it the other way around, one could simply include the smaller DTD into the larger one). How would I be able to determine if the simplified DTD is derived from the master DTD? 回答1: DTDs are really just

Include external XML ENTITIES using SYSTEM while resolving path with $ENV variable

断了今生、忘了曾经 提交于 2019-12-24 11:54:12
问题 Looking at some posts and others, I'm close to what I'm looking for, but not there yet. Overall goal To have XML ENTITY file s included within other XML file s , with the URI to SYSTEM taken from the an environment variable! Sample XML ENTITY files (not sure if xml declaration needed) $XML_PATH_SET_PER_ENV/entites/$CLIENT/entities.ent <!ENTITY COMPANY_ID "9800"> <!ENTITY PARENT_ID "98100"> <!ENTITY ACCOUNT_NAME "THE SUN PEOPLE"> <!ENTITY ACCOUNT_AB "TSP"> or $XML_PATH_SET_PER_ENV/entites/

System.Xml.XmlDocument, what's the best way to cache an external dependency DTD?

匆匆过客 提交于 2019-12-24 10:47:45
问题 I'm loading valid XHTML into an XmlDocument, but it takes 2 seconds to load. I've found that if I drop the DTD, it's instant, but then I have to replace   to  , etc. The number of declared HTML entities is large, so I feel the DTD should be loaded. So what is the easiest way to pre-load the DTD with minimal manual labor? Perhaps if I could, say, put the DTD into the assembly as a resource file and inject it in..? Any suggestions? 回答1: I found a technique here, by implementing the abstract

Firefox addon doesn't work when using % in menu label and tooltip

别来无恙 提交于 2019-12-24 08:47:07
问题 I am working on a firefox addon, and when I use % for a menu label and tooltip the addon doesn't work (doesn't show up on firefox). I am using the % in a .dtd file like this: <!ENTITY addonName.menuX "%09 (Tab)"> And in the .xul file like this: <menuitem class="menuitem-iconic" image="chrome://addonName/skin/image.png" tooltiptext="&addonName.menuX;" label="&addonName.menuX;" oncommand="addonName.function( 'X' )" /> If I delete the % from <!ENTITY addonName.menuX "%09 (Tab)"> it works fine. I

Is DTD deprecated?

天涯浪子 提交于 2019-12-24 04:30:07
问题 In What is difference between XML Schema and DTD?, two answerers state that DTD "is deprecated". One of them, user vtd-xml-author, states that DTD is pretty much deprecated because it is limited in its usefulness [...] at which user Jesse Chisholm comments Deprecated? No. [XDR is deprecated] Going out of fashion? Maybe [...] In What is DTD exactly?, user AlexR comments on an answer as follows: Note that DTD is deprecated in favor of the more declarative and powerful XSD. In this case, no-one

DTD element empty and any

百般思念 提交于 2019-12-24 01:16:17
问题 In a dtd, can an element be defined as <!ELEMENT name (ANY|EMPTY)> meaning that an name can either be like <name/> or it can contain any elements that does break xml rules? 回答1: No, but if you use the type ANY , it can still be empty. Examples: <!DOCTYPE name [ <!ELEMENT name ANY> ]> <name/> - <!DOCTYPE name [ <!ELEMENT name ANY> <!ELEMENT foo (#PCDATA)> ]> <name> <foo/> </name> 来源: https://stackoverflow.com/questions/12736648/dtd-element-empty-and-any

Validating with DTD - connection forcibly closed

◇◆丶佛笑我妖孽 提交于 2019-12-23 17:37:53
问题 I'm validating a document with the DTD in the document which is not on my machine, it is stored on the internet. I am currently getting the following exception System.Xml.XmlException: An error has occurred while opening external DTD 'http://xml.cxml.org/schemas/cXML/1.2.020/cXML.dtd': Unable to connect to the remote server ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

xpath: contains() for a group of answers

跟風遠走 提交于 2019-12-23 12:28:46
问题 I'm trying to learn XPath, and I am having trouble with doing a nested search (using contains). Specifically, I was given the following question: There is a list of authors, and a list of books, according to the following dtd: <!ELEMENT db1 (book*, author*)> <!ELEMENT book (title)> <!ATTLIST book bid ID #REQUIRED authors IDREFS #REQUIRED > <!ELEMENT title (#PCDATA)> <!ELEMENT author (#PCDATA)> <!ATTLIST author aid ID #REQUIRED > Write an XPath expression that returns the number of authors who

How is XML a general data format?

六眼飞鱼酱① 提交于 2019-12-23 03:09:58
问题 We can use any tag of our choice in XML. If we have a DTD and style associate with it, we can parse it in browser. We can transfer data in XML format. But if XML tags are not fixed like HTML, how two systems come to know each other's meaning of the tags while talking (ex web services)? How can XML be a general data exchange language on the vast Internet?? 回答1: XML is a general language but pretty much any communication using XML will use a specific XML application such as XHTML, RDF, Atom,

Working with XML document type definitions in .net

自作多情 提交于 2019-12-23 01:43:47
问题 Is it possible to import an XML DTD into Visual Studio in order to generate a proxy class? I have a third party .dll that I need to interface with that is designed like an XML service. The interface into the .dll is all driven by XML inputs, and returns output as XML. The nice thing about it is that all the input and output types are well defined. The bad news is that they use DTD (Document Type Definition). I would really like not to have to build up the XML by hand, but I only know how to