OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] how to design an HTML file to contain an XML file?

[ Lists Home | Date Index | Thread Index ]
  • To: David Megginson <david.megginson@gmail.com>, xml dev <xml-dev@lists.xml.org>, Joseph Dane <jdane@hawaii.edu>
  • Subject: Re: [xml-dev] how to design an HTML file to contain an XML file?
  • From: Anil Philip <goodnewsforyou@yahoo.com>
  • Date: Tue, 25 Jul 2006 20:38:07 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=LldyPLGGXsSuUgfIQbF3HnchSl1vWdD9BzLkC4u1foG/5JPCAffMcLJebVCkoWmwd/Nx6mpeCY8n65YE9vMx+RdztMDS8OglOBuPAZmIsIFraFtiX+OdUspG4fHgvvF25hTryynBFdsRWQtYRVRmJt7yKZG3fdIR+8WZBp5ouP0= ;
  • In-reply-to: <75cb920c0606211301r3e9a8eafue4d5f5f001ed87ff@mail.gmail.com>

"put the XML in the XHTML head element, so that it won't be displayed"
 
Unfortunately, this does not seem to work.
 
When I do it and view the html page in the browser, I see at the top:
0 11 olathe weather 1.1 21.0 true 11 8 22.1 14.699999 true 19 26 36.8 19.8 true 45 15 56.6 21.800003 true 60 12
 
This is the data in the XML tags.
 
The header of my XHTML file is:
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<?xml version="1.0" encoding="ISO-8859-1"?>
<JWO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Projects\ACD\jwo_schema01.xsd">
Any help appreciated.
No, in time, I think you will be happy to see another useful and innovative XML application on the Web.
 
thanks,
Anil
 

David Megginson <david.megginson@gmail.com> wrote:
On 21/06/06, Anil Philip wrote:

> 2) How to prevent the SAX parser from choking on the HTML file that contains
> the XML file?

1. use XHTML instead of HTML, so that the whole document is parseable XML

2. put the XML in the XHTML head element, so that it won't be
displayed (you could also use CSS display: none, but that won't work
for browsers that don't support CSS).

3. Use a separate Namespace for your XML, and have your SAX
ContentHandler ignore everything that's not in that Namespace.


All the best,


David

--
XML 2006 Conference: http://2006.xmlconference.org/
Megginson Technologies Ltd.: http://www.megginson.com/


Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS