xhtml

can i validate xhtml programmatically from a php script?

你离开我真会死。 提交于 2019-12-11 09:09:37
问题 I would like to have a PHP function to check if a URL returns valid HTML or NOT, and returns true or false. Something like: if (validate_page("/somefile.html")) { echo "This page validated!!"; } I found TWINE but it doesn't just give me true or false. Also I got an error running it on my system. http://twineproject.sourceforge.net/ I found this offline tool that looked promising. http://htmlhelp.com/tools/validator/offline/ Also I found this thread that talks about a gem, but it sounds

inline svg not displaying in xhtml

依然范特西╮ 提交于 2019-12-11 09:07:20
问题 I have created an XHTML file with inline SVG. It does not display when tested as .XHTML but it does when tested as HTML. I have scoured the internet and believe I have the proper namespaces, etc. specified however, I'm stumped as to why it's not displaying. Please help me understand what I'm doing wrong. Note: I have also tried with or without xlink and I see no change (however I require xlink as I need safari support). Thanks in advance for your help! Example: index.xhtml <?xml version="1.0"

Parse XHTML5 with undefined entities

岁酱吖の 提交于 2019-12-11 09:06:21
问题 Please consider this: import xml.etree.ElementTree as ET xhtml = '''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head><title>XHTML sample</title></head> <body> <p> Sample text</p> </body> </html> ''' parser = ET.XMLParser() parser.entity['nbsp'] = ' ' tree = ET.fromstring(xhtml, parser=parser) print(ET.tostring(tree, method='xml')) which renders nice text

Open browser windows without menu bars (JavaScript?)

我的未来我决定 提交于 2019-12-11 09:06:03
问题 The users in my community want the chat to be opened in a small window without all the control bars. So I think a popup window without scroll bars, location bar, status bar and so on would be the best solution. Right? What is the best way to have such a popup window? JavaScript? Can I do it like this? BETWEEN AND <script type="text/javascript"> <!-- var win = NULL; onerror = stopError; function stopError(){ return true; } function openChat(){ settings = "width=640, height=480, top=20, left=20

How to put a bullet beside the heading elements as background image

久未见 提交于 2019-12-11 08:15:22
问题 I'm using CSS and attempting to get what looks like a bullet point in the headings: This is the exact image I want. What I've done : h1,h2,h3 { background-image: url("the image link goes here"); } anyone get any ideas I've tried moving it and stuff but it just isn't happening. Cheers. 回答1: You should set the background-position as well and also a left padding for the heading elements to push the text to the right: h1, h2, h3 { background: url("the image link goes here") 0 center no-repeat;

Writing XMLDocument unescaped in C#

别等时光非礼了梦想. 提交于 2019-12-11 07:58:22
问题 Currently I'm writing XHTML in a XmlDocument. This works perfect, but I'm stuck on one problem. Some XmlText elements can contain things like  . When I want to write such things to a stream it uses the innerXML instead of the innerText value for such nodes. The problem is that the ouput is wrong because now its outputting &nbsp; instead of  . How can I use xmlwriter and xmldocument without performing such escaping when writing to a stream? I just want unescaped output. 回答1: If you use

what meta-tags in the header of an (x)html page should be enough for SEO whitout overload it?

家住魔仙堡 提交于 2019-12-11 07:46:31
问题 what meta-tags in the header of an (x)html page should be enough for SEO whitout overload it? 回答1: A few years back, meta tags were important to search engine optimization. However, they've been abused and are generally ignored by almost all search engines (including Google, Yahoo and Live search). The most important tags for SEO that you can include in your (X)HTML are the <title> and <meta name="description"...> tags. <title> should generally be what you'd want the search engine to name

Remove a value from a querystring Part 2

亡梦爱人 提交于 2019-12-11 07:34:06
问题 Expanding on my original question here: I would now like to remove more than 1 variable from the querystring. For example, I want to remove the variables bar1 & bar2 from the querystring. I have tried the following code: echo parseQueryString("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'],"bar2","bar1"); But this doesn't remove both variables, only bar2 . Any help appreciated. Thank you, Matt 回答1: You'll be wanting something like echo parseQueryString(parseQueryString("http://" .

Yahoo Blueprint Apps

断了今生、忘了曾经 提交于 2019-12-11 07:04:27
问题 Since yahoo! closed support of all blueprint apps, is there any method to convert existing blueprint custom tags to standard html/x-html code? Any information on this regard will be helpful. Thanks 回答1: XSLTForms and Orbeon Forms are based on the same XForms standard as Yahoo Blueprint: Much of Blueprint's philosophy and syntax comes from XForms. We opted for a full declarative language because it was the only way we could effectively run on the wide range of devices out there, some of which

touch.facebook.com on iPhone giving me “Entity 'nbsp' not defined”

我的未来我决定 提交于 2019-12-11 07:01:11
问题 Just as I found a way to access my app's profile page on touch.facebook.com, thanks to logan and this url format... http://touch.facebook.com/profile.php?id=myappid ...I ran into this new problem. It worked fine for a while, and then all of a sudden for no apparent reason, instead of my app profile, iOS Safari only shows a red warning box telling there's an error called "Entity 'nbsp' not defined". I Googled it and found out it's a common XHTML error that's mostly ignored by everyone except