Good to hear!
The HTML serializer could be improved to issue a warning if the root element has a null namespace. This could avoid confusion.
-Erik
Hank Ratzesberger wrote:
Aha! You know, every time I think there is some quirk, I find
out that it its complying with specifications. I changed my serializer config to the following and I get xhtml that is rendered properly. --Hank
<!-- Deliver xhtml --> <p:processor uri="oxf/processor/xml-serializer"> <p:input name="config"> <config> <content-type>text/html</content-type> <public-doctype>//W3C//DTD XHTML 1.0 Strict//EN</public-doctype> <system-doctype>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</system-doctype> </config> </p:input> <p:input name="data" href="#data"/> </p:processor>
----- Original Message ----- From: "Erik Bruchez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 26, 2004 1:46 AM
Subject: Re: [orbeon-user] HTML Serializer -- namespace
If your root element is in a namespace, it is not HTML. So the HTML serializer will not do anything good with your document. This is the reference for the HTML output method used:
http://www.w3.org/TR/xslt#section-HTML-Output-Method
"The html output method should not output an element differently from the xml output method unless the expanded-name of the element has a null namespace URI"
If your document is in a namespace, you should use the XML serializer.
-Erik
Hank Ratzesberger wrote:
Eric, et. al.,
When I remove the namespace from my html, it does not create pairs for empty content elements. (Note, however, that it does two content type
elements.) The xsl code, with the namespace attribute for the html tag, is listed below, part of the previous thread. I tried removing the namespace attribute. I am 95% certain this is a different behavior.
Happy to get more facts if you want, Hank
Working html: "<html>"
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>[EMAIL PROTECTED]</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="/css/styles.css" rel="stylesheet" type="text/css"> </head>
Non-working html: "<html xmlns="http://www.w3.org/1999/xhtml">
<html> <head> <title>[EMAIL PROTECTED]</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta> <link href="/css/styles.css" rel="stylesheet" type="text/css"></link> </head>
----- Original Message ----- From: "Hank Ratzesberger" <[EMAIL PROTECTED]>
Eric,
I didn't configure my own serializer. I did have a version of xalan.jar in the endorsed directory as required by another application. I removed it, no difference.
Below is the default pipleline, which simply aggregates a site preferences file with the name of the file/url requested. The html serialzer config is empty content. Below that is a portion of the stylesheet,(which starts life as an xhtml in Dreamweaver, an attempt to acheive wyswig content editing). Below that, excerpt of the ouput html.
This was an upgrade, and it is not war'ed up. I was using an original copy of config/properties.xml -- now it is the same as the release.
It must be something to do with the upgrade, but I can't see what.
Thanks, Hank
pipeline:
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline">
[snip] get the name of the file...
<!-- Default processing is to Process xml data with stylesheet --> <p:processor uri="oxf/processor/xslt"> <p:input name="config" href="#file"/> <p:input name="data" href="aggregate('root', /site-prefs.xml, #instance)"/> <p:output name="data" id="data"/> </p:processor> <!-- Deliver html --> <p:processor uri="oxf/processor/html-serializer"> <p:input name="config"> <config/> </p:input> <p:input name="data" href="#data"/> </p:processor> </p:config>
portion of the stylesheet
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xforms="http://www.w3.org/2002/01/xforms" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:template match="/"><html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/base.dwt" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>[EMAIL PROTECTED]</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <!-- InstanceBeginEditable name="head" --> <!-- $Header: /opt/cvsroot/nees-www/www/resources/index.xsl,v 1.4 2004/10/21 18:59:00 hankr Exp $ --> <!-- InstanceEndEditable --> <link href="/css/styles.css" rel="stylesheet" type="text/css"/> </head> [snip]
resulting html: notice that even the meta and link elements are paired.
<html> <head> <title>[EMAIL PROTECTED]</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta> <link href="/css/styles.css" rel="stylesheet" type="text/css"></link> </head>
----- Original Message -----
Hank,
We use the HTML serialization code from Xalan. <br/> should definitely produce only one <br>. As far as I know, we haven't changed this at all.
This is curious as I don't see this problem. Do you configure your own HTML serializer by any chance?
-Erik
Hank Ratzesberger wrote:
I just upgraded from 2.2 to 2.5.
There was just one unusual side effect. I had some markup with "<br/>" elements. Under 2.5, these become "<br><br/>" which has the effect of creating two newlines. Indeed, all empty content elements have open and close tags.
Can it be a xalan.jar in my endorsed directory?
Best, Hank
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ orbeon-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/orbeon-user
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ orbeon-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/orbeon-user
------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ orbeon-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/orbeon-user
------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ orbeon-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/orbeon-user
