xhtml

double submission when refresh php

戏子无情 提交于 2019-12-03 20:16:49
I'm trying to correct the issue of double submit in my script. When I press submit it only updates mysql once(which is what I want). However, when I hit refresh it updates mysql again. It seems to ignore the if statement once the refresh button is hit. What would I do to stop this here is my code if (isset($_POST['submitButton'])) { //do something } <form action = "table.php" method="post"> <label for="submitButton"></label> <input type="submit" name="submitButton" id="submitButton" value="Submit Form"/> </form> When you refresh the page - the POST IS SENT AGAIN Some browsers actually warn you

Conditionally set an attribute on an element with JSP Documents (JSPX)

拜拜、爱过 提交于 2019-12-03 19:09:24
问题 In HTML forms, buttons can be disabled by defining the "disabled" attribute on them, with any value: <button name="btn1" disabled="disabled">Hello</button> If a button is to be enabled, the attribute should not exist as there is no defined value that the disabled attribute can be set to that would leave the button enabled. This is causing me problems when I want to enable / disable buttons when using JSP Documents (jspx). As JSP documents have to be well-formed XML documents, I can't see any

Polyglot-Markup validator

家住魔仙堡 提交于 2019-12-03 17:13:50
Is there a free online polyglot-markup validation service that will correctly identify and validate polyglot-markup? I did find totalvalidator and htmlvalidator but those are (paid) non-web-based solutions. Use http://validator.w3.org/nu/ and use “Options” to select first HTML5 (= HTML5 in HTML serialization) parsing mode, then XML parsing mode. 来源: https://stackoverflow.com/questions/16281471/polyglot-markup-validator

Nokogiri recursively get all children

北城以北 提交于 2019-12-03 16:59:35
问题 The Problem I am running some statistics against various URLS. I want to find the top level element with the most concentrated number of children. The method that I would like to follow is to identify all top level elements and then determine what percentage of all the elements on the page belong to it. Goal Recursively get all children of a given element. Inputs: a Nokogiri Element Outputs: an array of Nokogiri Elements OR the count of total number of children Setup Ruby 1.9.2 Nokogiri gem

Validation of XML Sitemap urlset with xhtml:link inside url element

寵の児 提交于 2019-12-03 16:33:52
I am trying to create a sitemap such as the below and I get this error: <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xhtml:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> <url> <loc>http://www.something.com/something</loc> <xhtml:link rel="alternate" hreflang="en-us" href="http://www.something.com/something" /> </url> </urlset> Error: http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd "> ^ Error 1866: Element '{ http://www

HTML attribute accesskey not working as it should

你。 提交于 2019-12-03 15:58:22
So, I'm testing all different HTML tags and attributes, freshing things up a bit, and for some reason, accesskey does not appear to be working. The accesskey attribute is used to assign a key to an element. Depending on your OS, pressing Alt+that key (Windows) or Cmd+that key (Mac) will give focus to that element. Here's a little something: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us"> <head> <title>Title</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

XSD to XForms and XForms to XSD conversion

淺唱寂寞╮ 提交于 2019-12-03 15:39:33
Currently I am struggling with two problems: I am receiving from outer server an XSD file and based on this file I have to generate XForm. Usually the XSD file is importing many other XSD files and so on. I am writing a GUI with XForm builder. When the user builds his custom XForm I need to generate from it an XSD file and send it back to the outer server. Major question is: Is it possible to write those two converters which generate files and complies with the standard (XML Schema and XForms)? Do you know any existing library offering conversion between those two formats: XSD and XHTML? It is

Easiest way to convert a PHP page to static HTML page

依然范特西╮ 提交于 2019-12-03 15:03:40
I want to convert a web pages which is heavily CSS styled is written in PHP to static html so that I can embed it in an email. I have managed to do this but for achieving this I had to convert the whole page into a string and then assign that string as email body. The layout of the page does not look as good as original as I have not been able embed CSS. This approach has a few problems like if any changes have to be made to the layout of the page I have to redo the whole process for generating an embeddable page. I want an easier way which will allow me to keep the original page editable in

Relative paths in Flying Saucer XHTML?

≡放荡痞女 提交于 2019-12-03 14:14:07
I am using Flying Saucer to render some PDF documents from strings to XHTML. My code is something like: iTextRenderer.setDocument(documentGenerator.generate(xhtmlDocumentAsString)); iTextRenderer.layout(); iTextRenderer.createPDF(outputStream); What I'm trying to understand is, when using this method, where are relative paths in the XHTML resolved from? For example, for images or stylesheets. I am able to use this method to successfully generate a text-based document, but I need to understand how to reference my images and CSS. The setDocument() method takes two parameters: document and url.

When will you start using HTML 5?

岁酱吖の 提交于 2019-12-03 13:58:39
问题 So HTML 5 has been widely publicised as expected to be ready in 2022. This is a long time to wait, and the test for that readiness is that "at least two browsers to completely pass [HTML 5 test suites]" Obviously for browsers to pass this test they have to start implementing usable HTML 5 features before that. The list of new HTML5 features supported is looking thin at the moment. But there are a couple of significant changes to existing elements such as allowing A tags to surround block