Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 13th, 2011, 11:40 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

Well that DOCTYPE neither has a system id pointing to an external DTD file nor an internal subset so it shouldn't change the parsing, unless your XML parser is using a catalog file to map the public identifier "-//ES//DTD full length article DTD version 4.3.1//EN" to a DTD file. You would need to look into the DTD file to find out whether it has similar namespace declarations as the one you posted earlier.
As an alternative you could write a stylesheet doing
Code:
<xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
and inspect the result, it should show any namespace declarations. Then you need to take them into account, the same way as we showed you for the other file.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
 
Old October 13th, 2011, 11:54 AM
Registered User
 
Join Date: Oct 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found the DTD for this on the web http://www.info.sciverse.com/UserFil...d43/art431.dtd

It doesn't look like it has the namespace issue as the previous one, but please correct me if I am wrong.

When I tried changing teh XSLT code with

<xsl:template match="/"><xsl:copy-of select="."/></xsl:template>

I still get an error "The document type declaration for root element type "art" must end with '>'"

I am using a java program to do the xslt conversion with transformer.transform() method for the conversion.

Thanks,
Neha
 
Old October 13th, 2011, 12:03 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

The DTD seems to be an SGML DTD, not an XML DTD. So parsing with an XML parser fails with a parser error. I can't tell you a quick way how to fix that, you will need to find out why you get some SGML document and not an XML document by asking whoever provides you with the documents.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
 
Old October 13th, 2011, 12:09 PM
Registered User
 
Join Date: Oct 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for identifying the issue.I really appreciate your help...!!!!

Thanks again,
Neha





Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter XML file with an XSLT using DTD menhir666 XSLT 1 February 3rd, 2009 11:50 AM
Automated tool to convert XML from DTD to DTD lsantos2000 XSLT 2 October 17th, 2007 08:21 AM
Can XSLT read DTD/schema and Generate XSLT.. ROCXY XSLT 1 November 6th, 2006 09:39 AM
Issue with DTD tgopal CSS Cascading Style Sheets 2 September 20th, 2006 04:15 AM
DTD base XSLT Grouping ROCXY XSLT 1 February 27th, 2006 07:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.