This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Transfer Learning for Natural Language Processing (MEAP) and have Paul Azunre on-line!
See this thread for details.
Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

How to incluse a dtd.

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I have xml and xsl files. Now I have to generate another xml file using these 2 files. I can generate normally. But if I want to include some dtd file into the generated xml file then I should modify the xsl file. Now if I try to generate xml file it is giving error as
Cannot have a DOCTYPE declaration outside of a prolog.
Can sobody help me.
Srinivas
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Srinivas,
You should include the following element in your XSLT file:
<xsl utput method='xml' doctype-system='doc.dtd'/>
where doctype-system is the system identifier (location) of the dtd file of the result xml.
This should output a document type declaration immediately before the root element in the target document as follows (assuming <root> is the root element name):
<!DOCTYPE root SYSTEM 'doc.dtd'>
----
Joel Amoussou
IBM XML Certification Practice Test
http://www.xmlmentor.net/xmlexamsim.htm
 
Joel Amoussou
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course I mean:
<xsl utput method='xml' doctype-system='doc.dtd'/>
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic