xhtml

Difference in display between HTML and XHTML

孤街醉人 提交于 2019-12-20 02:37:12
问题 I thought XHTML documents were supposed to be displayed with exactly the same standards compliance mode as "strict" HTML documents. However, there is a difference in how they display pre elements: in HTML documents, if the <pre> start tag is followed by a LF (or CRLF), this is ignored. Not so in XHTML. Example: a HTML file and a XHTML file that have the same content, but are rendered differently. (Or if you think it's cheating to give a HTML file and a XHTML file exactly the same content,

How to use an incremented counter to provide a unique id in XSLT?

本小妞迷上赌 提交于 2019-12-20 02:29:48
问题 I am using XSLT to convert a very large XML document into (X)HTML. For some of the tags I am converting them to a <div> . I would like to be able to create a unique id for these tags, using an incremented integer to form part of the unique id. An example of the rule I am using is: <xsl:template match="bookcoll/book"> <div class="book"> <xsl:apply-templates/> </div> </xsl:template> This XSLT template is working nicely. What I would now like to have is the tag: <div class="book">; becoming:

How to use an incremented counter to provide a unique id in XSLT?

*爱你&永不变心* 提交于 2019-12-20 02:29:03
问题 I am using XSLT to convert a very large XML document into (X)HTML. For some of the tags I am converting them to a <div> . I would like to be able to create a unique id for these tags, using an incremented integer to form part of the unique id. An example of the rule I am using is: <xsl:template match="bookcoll/book"> <div class="book"> <xsl:apply-templates/> </div> </xsl:template> This XSLT template is working nicely. What I would now like to have is the tag: <div class="book">; becoming:

CSS Drop Down Menu -> Cross Browser

我是研究僧i 提交于 2019-12-19 12:04:30
问题 Can any of you wonderful developers link or provide me with a link to a menu that is cross browser I am having issues with mine and its loading within firefox but is fine in chrome. My div stays in the correct position but the menu itself drops down below the div. My HTML is dynamically generated and the current structure is: <nav id="mainMenu"> <ul> <li class="first"> <a href="#">Single Item</a> </li> </ul> <ul> <li class=""> <a href="#">Drop Down Menu</a> <ul> <li class="first"> <a href="#"

How to send HTML/CSS emails?

こ雲淡風輕ζ 提交于 2019-12-19 09:15:34
问题 Most email clients have problems reading CSS in HTML emails (including Gmail and Hotmail). I often use this service to convert my HTML/CSS to proper email format so that everything looks normal on the user's end. Basically what it does is convert all CSS to inline styles: http://premailer.dialect.ca/ Do any of you have any other methods for sending CSS in your HTML emails? I automatically generate the emails, and due to some restrictions, I can't modify the the inline styles. 回答1: As for

Stop WordPress from enclosing script in CDATA

心不动则不痛 提交于 2019-12-19 08:44:38
问题 I am importing HTML pages using HTML import plugin for WordPress. I have a code snippet for google maps, which is imported. However, after import, it encloses the script tag in CDATA . If I remove CDATA, the map works fine. How do I stop WordPress from enclosing the script with CDATA? Here's the script : <script type="text/javascript"> <[[CDATA[ var locations = [ ['<strong>Alabama', 33.606379, -86.50249, 1] ]; var map = new google.maps.Map(document.getElementById("map"), { zoom: 5, center:

Stop WordPress from enclosing script in CDATA

别说谁变了你拦得住时间么 提交于 2019-12-19 08:42:11
问题 I am importing HTML pages using HTML import plugin for WordPress. I have a code snippet for google maps, which is imported. However, after import, it encloses the script tag in CDATA . If I remove CDATA, the map works fine. How do I stop WordPress from enclosing the script with CDATA? Here's the script : <script type="text/javascript"> <[[CDATA[ var locations = [ ['<strong>Alabama', 33.606379, -86.50249, 1] ]; var map = new google.maps.Map(document.getElementById("map"), { zoom: 5, center:

Non-deprecated equivalent of <form target=“…”>

∥☆過路亽.° 提交于 2019-12-19 07:10:20
问题 I want to achieve the same as... window.open('lalala.php', 'lalala', '...'); But I want to send a HTTP POST request instead of a HTTP GET request. Thus, I'm using the following: $('<form/>').attr('action', 'lalala.php') .attr('target', 'lalala') // w3schools.org says this is deprecated .attr('method', 'post') .append(hiddenParam('param1', param1)) .append(hiddenParam('param2', param2)) .submit().remove(); // hiddenParam is a function I created that returns an input tag // the type attribute

javascript name vs ID

限于喜欢 提交于 2019-12-19 06:29:31
问题 As far as I know there are two ways to get the value from a textbox either document.formName.textboxName.value; or document.getElementbyId('textboxId').value; As I understand using form name would mean I have less code to write, as name can be used for posting data and getting the value (apart from using ajax). As where if I was just posting using a standard form I would use name to post but I cannot use id ? e.g. in php I would use $_POST['texboxName']; If I where to have and ID on the

JTidy java API toConvert HTML to XHTML

时光总嘲笑我的痴心妄想 提交于 2019-12-19 03:57:15
问题 I am using JTidy to convert from HTML to XHTML but I found in my XHTML file this tag   . Can i prevent it ? this is my code //from html to xhtml try { fis = new FileInputStream(htmlFileName); } catch (java.io.FileNotFoundException e) { System.out.println("File not found: " + htmlFileName); } Tidy tidy = new Tidy(); tidy.setShowWarnings(false); tidy.setXmlTags(false); tidy.setInputEncoding("UTF-8"); tidy.setOutputEncoding("UTF-8"); tidy.setXHTML(true);// tidy.setMakeClean(true); Document