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 ]

moving the <?xml version="1.0" encoding="ISO-8859-1"?>
did not fix it.
However, changing to <xml version="1.0" encoding="ISO-8859-1"> </xml>
removes the display of xml data on the first line in IE browser.
But when I try to parse this, I get
org.xml.sax.SAXParseException: The element type "meta" must be terminated by the matching end-tag "</meta>".
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at nodepad.OpenJWO.parseTree(OpenJWO.java:44)

I have also put the following as the first line in my startElement() and endElement():
 
  if(!namespaceURI.equalsIgnoreCase("http://www.w3.org/2001/XMLSchema-instance")) {
   return;
  }  
thanks,
Anil

Tei <oscar.vives@gmail.com> wrote:
On 7/26/06, Anil Philip 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:
>
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
>
>
>
> > 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 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:


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


xsi:noNamespaceSchemaLocation="C:\Projects\ACD\jwo_schema01.xsd">





...

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:






%entities;

]>




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..

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org , an
initiative of OASIS

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager:



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