xhtml

custom data attributes alternative?

早过忘川 提交于 2020-01-15 07:58:05
问题 The following code is in a while loop, with values from the database. I am storing these values in custom data attributes for jQuery. <div class='pending-information' data-id='$id' data-pid='$position' data-sid='$sid' data-image='$image' data-counter='$counter' data-start='$start'></div> What is the professional approach? This method won't be valid in XHTML1. So whats the common method for storing attributes/values for jQuery? 回答1: What is the professional approach? Exactly what you are doing

Define default namespace (unprefixed) in lxml

限于喜欢 提交于 2020-01-15 07:01:27
问题 When rendering XHTML with lxml, everything is fine, unless you happen to use Firefox, which seems unable to deal with namespace-prefixed XHTML elements and javascript. While Opera is able to execute the javascript (this applies to both jQuery and MathJax) fine, no matter whether the XHTML namespace has a prefix ( h: in my case) or not, in Firefox the scripts will abort with weird errors ( this.head is undefined in the case of MathJax). I know about the register_namespace function, but it does

Is CDATA really necessary?

允我心安 提交于 2020-01-14 07:56:06
问题 I use inline Javascript quite a bit, usually in WordPress themes that I make. I had not heard of wrapping inline Javascript in //<![CDATA[ ... //]]> up until a few months ago, and I have been doing this stuff at a fair level of competency for a few years. I googled around and I hear that people use this because their Javascript doesn't validate otherwise. I use a strict 1.0 xHTML doctype and have never had a problem validating my markup. Is it because I use jquery, or because usually I only

PrimeFaces Extensions CKEditor: cannot access custom config

允我心安 提交于 2020-01-14 05:15:06
问题 I need my pe:ckEditor to load custom config, but I have been unsuccessful in this matter for some time, I will welcome any suggestions how to make it work. (I need it do work because I have this problem: PrimeFaces Extensions CKEditor: when saving content, foreign characters get "twisted", which might be solved by this https://ckeditor.com/old/forums/CKEditor-3.x/utf-8-ckeditor or something like this https://ckeditor.com/old/forums/Support/Change-charset-UTF-8) The custom config file is in

web link in svg

匆匆过客 提交于 2020-01-14 03:27:11
问题 I need to have a linked text inside a svg graph. Here is what I did <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="138pt" height="188pt" viewBox="0.00 0.00 138.00 188.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/1999/xhtml"> <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 184)"> <g id="node5" class="node"><title>EQ2</title> <ellipse style="fill:none;stroke:black;" cx="65" cy="-18"

“PWC3999: Cannot create a session after the response has been committed” [duplicate]

烂漫一生 提交于 2020-01-13 15:31:48
问题 This question already has answers here : Adding <h:form> causes java.lang.IllegalStateException: Cannot create a session after the response has been committed (5 answers) Closed 3 years ago . I'm having this weird problem with one of the pages of my application. It's throwing the error I mention on the title: PWC3999: Cannot create a session after the response has been committed I've checked other posts regarding this subject, but I don't see anything that applies to this situation, because

Converting HTML to XML using XSLT

假如想象 提交于 2020-01-13 13:53:11
问题 I'm trying to convert an XHTML document to XML using XSLT but I'm currently having trouble getting my templates to match the tags in the input document. Should I be able to convert XHTML to XML like this? If so is there an error in my stylesheet? Input Document: <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>title text</title> </head> <body> <p>body text</p> </body> </html> Stylesheet: <?xml version="1.0" encoding="UTF-8"?> <xsl

How can I produce an nested list in XHTML strict without giving the nested lists first element a double bullet?

筅森魡賤 提交于 2020-01-13 10:05:37
问题 I'm trying to create a list nested within a list using XHTML Strict 1.0. The problem is that with XHTML strict a ul element can not be nested directly within another ul element. Thus, the inner ul element has to be nested within a li element. However, when doing it this way, the first row of the inner list get a dubble bullet, as shown in the example below. So now B gets a double bullet since the outer and inner li elements both create a bullet. Do anyone know how to fix this in CSS so that B

can a <tfoot> go at the bottom of a table?

孤街浪徒 提交于 2020-01-13 07:42:29
问题 I'd like to use a <tfoot> tag in a table to be semantically correct, but it keeps showing up at the the top of my table. Is there a way to tell it to display at the bottom? 回答1: According to the specification, you may place the tfoot before, or after, the tbody element(s). See the following description from the previous link. Contexts in which this element can be used: As a child of a table element, after any caption, colgroup, and thead elements and before any tbody and tr elements, but only

NSXMLDocumentTidyHTML doesn't tidy some XHTML validation errors

流过昼夜 提交于 2020-01-13 06:12:24
问题 I want to grab text from a list of web pages. I've done a bit of experimenting and found that the best way for my needs is via WebKit. Once the source of the page has been grabbed, I want to strip out all the HTML tags, by using the technique in this comment. Here's my code: - (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame { if(frame == [sender mainFrame]) { NSString *content = [[[[sender mainFrame] dataSource] representation] documentSource]; NSXMLDocument