Все вопросы: [dtd]

93 вопросов

похожие теги: dtd-parsing
0
голосов
1ответов
311 просмотров

How to create XML file that uses two DTDs?

We're creating a REST service where the client will send XML containing a financial portfolio. The portfolio XML will use a published standard XML DTD. We would like to add a few bits of data to the portfolio XML. We would like to keep the ability to validate the XML against the published DT...

0
голосов
1ответов
751 просмотров

Is there a better Regex for parsing DTD

I've got the DTD for OFX 1.03 (their latest version despite having developed and released 1.60, but I digress...) I would like to use regex to have groups that split an entity, element, other tags into its parts for further processing such that I would take a tag like this: <!ENTITY % ACCTTO...

1
голосов
4ответов
2722 просмотров

IE cannot find the W3C XHTML DTD (Error 2146697204)

I have a template that starts every page like this: <?xml version="1.0" encoding="utf-8"?> <!-- blah blah--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > <html xmlns="http://www.w3.org/1999/xhtml"&...

0
голосов
2ответов
458 просмотров

Why does the use of the Frameset DTD cause a validation failure?

The project I work on takes random HTML files, converts them to XHTML as best as it can, and wraps them with some XML metdata. The DOCTYPE is stripped out as the resulting XML file is not an XHTML document. However when retrieving the wrapped XHTML from the XML file the DOCTYPE should be reinsert...

0
голосов
1ответов
487 просмотров

Validate XML against DTD using python on google app engine

I've got validation working on client side using lxml, but I'm not quite sure how to get it work on Google App Engine, since it doesn't have the lxml package. I tried copying the whole lxml folder and place it in the root of my Google application, but it seems like it cannot use it properly. I'm ...

177
голосов
12ответов
186983 просмотров

What is difference between XML Schema and DTD?

I have googled this question, but I do not understand clearly what is an XML schema and DTD (document type definition), and why the XML schema is more powerful compared to DTD. Any guidance would be highly appreciated.

0
голосов
2ответов
3539 просмотров

c# XML DTD validation. ENTITY is an unexpected token

Im trying to validate an XML file using a .DTD but it gives me the following error. 'ENTITY' is an unexpected token. The expected token is 'DOCTYPE'. Line 538, position 3. public static void Validate(string xmlFilename, string schemaFilename) { XmlTextReader r = new XmlT...

60
голосов
4ответов
78893 просмотров

Free DTD to XSD conversion utility?

I have a DTD that I need to convert to an XSD (XML schema) file. Is there a free utility or simple way to accomplish this?

5
голосов
4ответов
9688 просмотров

Problem validation a XML file with a local DTD file in C#

I'm triying to validate a XML file. I'm using this code XmlReaderSettings settings = new XmlReaderSettings(); settings.ProhibitDtd = false; settings.ValidationType = ValidationType.DTD; settings.ValidationEventHandler += new ValidationEventHandler(validationError); XmlSchemaSet schemas...

1
голосов
2ответов
3220 просмотров

Reading RSS problem - Expected DTD markup was not found

I am opening XML file that refers to a DTD as follows: <?xml version="1.0" encoding="windows-1250"?> <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd"> Here is the part of C# code: public static XmlDocume...

5
голосов
5ответов
2775 просмотров

xmltask confused about dtd

I'm trying to use xmltask for ant to modify a file in a subdirectory: project/path/to/file.xml The file refers to a DTD like this: <!DOCTYPE data SYSTEM "mydtd.dtd"> I don't have the flexibility to change these documents. This DTD is stored in the same subdirectory, which has always ...

30
голосов
4ответов
30604 просмотров

DTD or XML Schema. Which one is better?

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 XML Schema Langu...

2
голосов
1ответов
1430 просмотров

Firefox not reading DTD?

I have an XML file (diploma.xml) that looks like this: <?xml version="1.0" standalone="no" ?> <!DOCTYPE Diploma SYSTEM "diploma.dtd"> <Diploma> &students; &Registrations; &Courses; </Diploma> And the DTD looks like this: <!ENTITY students SYS...

1
голосов
2ответов
159 просмотров

Can the content of an XML element be bounded?

I am trying to write a DTD, and I want to define an element BOOKTYPE, that can be either ONE, TWO or THREE. Is there a way I can ensure that only one of these values can be entered inside the element? Note: 1. I know how to do this in an attribute, but not sure how to accomplish with elements. 2...

8
голосов
1ответов
9134 просмотров

How can produce a DOCTYPE declaration with DOM level 3 serialization API?

I have a DOM Document created from scratch and I need to serialize it to an output stream. I am using DOM level 3 serialization API, like in the following example: OutputStream out; Document doc; DOMImplementationLS domImplementation = (DOMImplementationLS) DocumentBuilderFactory.newInsta...

1
голосов
4ответов
258 просмотров

Is this a valid XML?

I have a feeling this XML is not valid, can someone please explain why? I think it has something todo this the dot i the element name? estate_price.price_suggestion Any thing else not valid about this XML? XML \ <?xml version="1.0" encoding="UTF-8"?> <iad> <DataTag> ...

1
голосов
1ответов
179 просмотров

Is there a class built-in to .NET for querying XML DTD information?

Does .NET provide any built-in support for working with XML DTDs? I want to retrieve element type, attribute lists, and entity declaration information. I'm aware of the support for validating against a DTD, but want to be able to work with the DTD information itself. I'd be fine parsing DTDs man...

0
голосов
3ответов
504 просмотров

Java 5 Does not validate DTD

I am working with a vendor applet, The applet works fine with JRE 1.4.2_X and 1.6.X but fails on every version of 1.5.X. Running with 1.6 is not an option due to another application conflict that does not play nice with Java 6. The issue I believe is that the DTD is not being validated. This is ...

0
голосов
2ответов
683 просмотров

Strict xml validation in php

I'm trying to fully validate an xml file which may be published by a user before it's fully published and live - it's basically somewhat like a sitemap.xml and it absolutely can't be published without being error-proof ( yes, I do have my own custom dtd for it as well ). I was also thinking of i...

10
голосов
2ответов
7539 просмотров

XML validation against given DTD in PHP

In PHP, I am trying to validate an XML document using a DTD specified by my application - not by the externally fetched XML document. The validate method in the DOMDocument class seems to only validate using the DTD specified by the XML document itself, so this will not work. Can this be done, a...

1
голосов
2ответов
520 просмотров

Element Declaration: Defining content as #PCDATA and one occurence of child element

In the xml spec, it says: [Definition: An element type has mixed content when elements of that type may contain character data, optionally interspersed with child elements.] In this case, the types of the child elements may be constrained, but not their order or their number of occurrences Is t...

3
голосов
4ответов
1684 просмотров

Validating XML in Python without non-python dependencies

I'm writing a small Python app for distribution. I need to include simple XML validation (it's a debugging tool), but I want to avoid any dependencies on compiled C libraries such as lxml or pyxml as those will make the resulting app much harder to distribute. I can't find anything that seems to ...

4
голосов
1ответов
1733 просмотров

WebLogic XML External Entity Resolution: Is there another way besides using the XML Registry?

We have an application that uses SiteMesh, and when WebLogic tries to parse the TLD files, it sees the DOCTYPE specification, containing the reference to the TLD DTD, at "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd". The server can not initiate outbound connections to the Internet, and so ...

6
голосов
2ответов
5036 просмотров

DTD Entities vs XML-Schema Elements

Using an Document DTD I did the following: file.xsl: <!DOCTYPE xsl:stylesheet[ <!ENTITY red "rgb(255,0,0)"> ]> <xsl:stylesheet> [...] <xsl:attribute name="color">&red;</xsl:attribute> [...] </xsl:stylesheet> I wanted to change everything to ...

1
голосов
1ответов
3115 просмотров

XML validation with an external DTD in Java

How can I test an xml string to see if it validates against and dtd file? I've read this question but they only see to be talking about replacing the dtd declaration on an xml file. Person.DTD <?xml version="1.0" encoding="UTF-8"?> <!ELEMENT person (id)> <!ELEMENT id (#PCDATA)&g...

3
голосов
2ответов
6658 просмотров

DTD ATTLIST Range of Numbers

Hi is it possible to only allow a range of numbers in an ATTLIST? I know you can have an enumeration of a set as follows: But it is possible to have 0 - 100, without having to type all 100 numbers? Thank you.

4
голосов
4ответов
1105 просмотров

How will a browser differentiate between XHTML 1.0 and XHTML 5?

By my understanding, neither XHTML (1.0, 1.1) nor XHTML 5 required a DTD. If this is true, how will a browser differentiate between the two? I can only assume that when the browser vendors support (X)HTML 5, all XHTML will be interpreted under XHTML 5 rules (assuming XHTML 5 is a superset of XHT...

-1
голосов
3ответов
1191 просмотров

XmlReader DTD Validation Error on an Attribute

I am trying to use XmlReader to parse a file and set each element's attributes to variables using reader.GetAttribute("atrribute_name"), but the elements may or may not actually have that attribute present, so some elements give me an error...I would have expected it would just return null when t...

0
голосов
2ответов
2671 просмотров

Проблема синтаксического анализа xml с c # linq to xml - ссылка на необъявленную сущность

попытка разобрать файл xml дает мне следующую ошибку Ссылка на необъявленную организацию eacute после того, как я создал файл dtd со всеми сущностями, которые я нашел здесь http: / /www.w3.org/TR/xhtml1/dtds.html , и я загрузил его следующим образом XmlReaderSettings settings = new XmlR...

2
голосов
2ответов
1139 просмотров

Опрос: как вы используете ID / IDREF? (или ключ / keyref)

Мне интересно, как люди используют эту функцию: какой домен, какие отношения (извиняюсь, если вопросы опроса неуместны). XML представляет деревья естественным образом с помощью включения; но он также может представлять графики, используя IDREF, которые относятся к идентификаторам: многие элем...