|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: how to design an HTML file to contain an XML file?
On 7/26/06, Anil Philip <goodnewsforyou@y...> wrote: > > "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. > http://juwo.com Move the <?xml version="1.0" encoding="ISO-8859-1"?> to the first line. Is wrong because you dont mix two namespaces (XHTML and XSI), but you embed one file into another. The resulting file Is not valid xml. Heres is a example that mix MathML and other stuff on XHTML: http://www.w3.org/TR/2002/WD-XHTMLplusMathMLplusSVG-20020430/sample.xhtml I am still learning XML, so _this can be wrong_, but maybe you can do that: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Projects\ACD\jwo_schema01.xsd"> <xsi:your data/> <xsi:your data/> <xsi:your data/> </meta> </head> ... Because you are working with XML, I thing you sould validate your files to debug it. If you are working with XHTML files, you sould care about the mime content type your server declare. Theres wildly different rules for text/html and application/xhtml+xml even if the XHTML code dont change: http://hixie.ch/advocacy/xhtml Unfortunally IE6 is broken and dont support application/xhtml+xml yet. I suggest defensive programming here. --Tei postdata0: If you use SVN, you can automatically validate the uploaded files (with a post-commit script). postdata1: Unrelated comment: I am curious about Firefox. I have read somewhere that you can concatenate two XML files on this browser. Somewhere on the xulplanet comments... postada2: And now a unrelated snip of code: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type='text/xsl' href='xmlspec.xsl'?> <!DOCTYPE spec PUBLIC "-//W3C//DTD Specification V2.1//EN" "xmlspec.dtd"[ <!ENTITY % entities SYSTEM "entitieswd.dtd" > <!ENTITY wgmb SYSTEM "wgmb.txt" > <!ENTITY prevwgmb SYSTEM "prevwgmb.txt" > %entities; <!ENTITY status "editors' copy"> ]> <spec w3c-doctype="rec" role="edcopy"> <header> <title>SOAP Version 1.2 Part 1: Messaging Framework</title> I found a fascinathing hack^H^Hfeature the use of wgmb to include a file. So much to learn with XML! :D postdata3: This is interesting because is more modular. The data is not embeded into the file (wgmb.txt). You are triing to embed data, I know. But maybe you are wrong and is a bad idea (: postdata4: Also I guest is better to use UTF8 than iso-8859-1, so you can mix north europe stuff with english, japan, israel, etc..
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||






