Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Empty element match >Thread Next - Re: Empty element match Re: Empty element matchTo: NULL Date: 7/1/2005 3:13:00 PM David Carlisle wrote: > Errors like this: > line 11 column 5 - Warning: <meta> element not empty or not closed > > Looks like those come from an XMl parser. > Parsing HTML with an XML parser is like parsing FORTRAN with a CParser, > you get errors, but it doesn't mean that there is anything wrong with > the file. > > A piece of the generated html page: > > That looks Ok except of course all teh xml namespace declarations > xmlns:... are invald html attributes. > > > >>With closing i also mean: <br/> (properly closed empty tag) > > > But as I said /> is XML syntax. It is not the syntax for an empty element > in HTML. > > >>Ok i understand, but html transitional and html strict are not xml >>languages? Or am i interchanging xhtml and html wrongly? > > > No version of HTML is an XML language. They are all defined via SGML > DTD. The XML versions are all called XHTML. > > >>So the conclusion of this is: >>IF your writing an html application that uses xsl transformation >>to output the html, then >>you have to change the xsl for each xsltransformer-implementation, > > > No that is not the conclusion at all. > You don't have to change your stylesheet but you may have to specify > that you want html serialisation in other (system specific) places. > The reason why XSLT doesn't mandate that xsl:ouput always has an effect > is that it allowes the result tree to be passed on as an in-memory treee > (or stream of sax events, or any other internal representation) This is > what happens in cocoon or if you run xslt inside of mozilla. > If the result tree is being passed on in such an in-memory format it is > never serialised to a linear document including tags so the hints on > xsl:output as to how to serialse the tree are never used. > > > >>Is there no possibility to enforce the parser to use <br/> for >>empty tags? > > > You can force xslt to use <br/> syntax by using the xml output method, > but that is not correct html markup for a line break.. > > You have to decide what you want to do, generate html or generate xhtml, > and in the later case you need to decide if you want to make IE be able > to read the file as it has no built in xhtml support (unlike say mozilla > or opera which can render xhtml files). > > The simplest, if you do not need xhtml in the document, is just to > generate html. > > David ok i want html, but why how do i overcome the problem that the parser/transformer on the hostingprovider does not listen to the xsl:output method attribute? Now it just renders to the xml output method, and that does not render well in internet explorer. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
