xhtml

Detect version of Java using JavaScript

Is there a reliable way of detecting what version of Java is installed on the client's machine using JavaScript? ...

Editable Div Element

Is it possible to have an editable div element that can only contain text and images. I understand that you can use the rich controls like TinyMCE and jWYSIWYG however I do not require all this functionality and want something lightweight. Basically all I want is a plain text editable element where I can also add various images such as...

Using XML parser to create XHTML code on fly

Hi all. Developing server side code i finally got my eyes X-crossed trying to write - and then understand, of course - forms or other html code in which text strings (attributes) within double quotes must occur in tagged string (markup) opening and closing properly; but often javascript text within apostophes must be instantiated, quite ...

Can I detect XHTML parsing errors using Javascript?

When I have a markup error in my XHTML page, Mozilla Firefox displays the "Yellow Screen of Death", showing only a large red error message on a yellow background. While these errors are rare, they are extremely user-unfriendly. Is there a way I can detect these using Javascript, and thereby send a message back to the server? What I've...

Greasemonkey: XPath returns no results for .xhtml page

When running on an xhtml page, xpath doesn't seem to return any results. var result = document.evaluate( "//a/img", document.body, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); For example returns an empty result set. What's the problem here, and how do I fix it? ...

How do I disable downlevel rendering in ASP.NET?

How do I disable downlevel rendering of my ASP.NET 2.0 site? I have a single master-page that all the other pages inherit from, and do not want "downlevel"-versions of the server-controls to be sendt to Google and W3C-validators. The best thing would be if this feature could be disabled for all users on all pages on my site. ...

W3C XHTML 1.0 Strict Compliant Image Map?

Is there anyway to make an image map W3C XHTML 1.0 Strict compliant? I'm working on this page and when I click my W3C Validator badge I receive a validation error. There is no attribute "type", <area type="rect" coords="21,19,155,76" ... Are there any tags for the XHTML 1.0 Strict compliant that have replaced the image map <map> an...

Space Before Closing Slash?

I've frequently seen a space preceding the closing slash in XML and HTML tags. The XHTML line break is probably the canonical example: <br /> instead of: <br/> The space seems superfluous. In fact, I think that it is superfluous. What is the reason for writing this space? I've read that the space solves some "backwards compatibil...

Meaningful markup of a Domain Object in a Webapp

Hello, I'm looking to represent some domain model objects in a web app I'm writing and I'm looking for best-practices for markup. For example in yaml: --- !ruby/object:User email: [email protected] first: John last: Doe login: jdoe member_since: 2009-01-22 00:54:08.128094 -05:00 What would be a sensible way to present this? Or the bes...

convert xhtml to wiki syntax using xslt

hi all, i would like to convert xhtml to dokuwiki syntax using xslt. now, one thing i can not seem to work my head around is how to handle nested lists. the dokuwiki syntax uses an asterisk (*) for a list item which is prepended by two white spaces per nesting level (c.f. wiki syntax). my question: in the following example, how can th...

Why are (X)HTML 5 and XHTML 2 separate standards?

Is there a reason why these two standards are being developed separately? They seem to be solving the same problem but what are the differences and, if they are to remain separate, what roles are they expected to take in web development in the future? ...

WBR Alternative in XHTML

I've been using tags in the thead cells for my tables, so I can control where browsers break long words. This works great, but its not XHTML compliant. What is the best alternative to using the wbr tag, that is valid XHTML? Example: <table> <thead> <tr><th>ThisIsAReally<wbr />LongWord<th></tr> </thead> <tbody> <tr><td>...

meta and img tags, generated in an xlt are not being closed correctly

I'm trying to get the meta and img tags to close in the output from an xlt. I've looked into it, and it seems I need to select an "xml" method rather than "html", but this still doesn't seem to work. I've currently got: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL...

Looking for reference of well-built XHTML/CSS/JSP2 norms/best practices.

Hello everybody, My task is to compile a norm / best practices especially for XHTML and CSS. Would somebody have some good references ? Thanks. ...

What options are there to find out if my ASP.NET MVC view is not XHTML compliant

Clarification: Thanks for the suggestions of tools for validating XHTML. I'm primarily looking for a solution that will run server side (or on the client with jQuery) so i can set it and forget it during development - and get told when I have issues without having to run a tool all the time. All this tag soup stuff scares me with ASP...

How to achieve two different alignments inside a html option tag?

I have a select html tag with country calling codes. <select name="countryCallingCode" id="countryCallingCode"> <option value="1"><span class="name">Afghanistan</span><span class="code">+93</span></option> <option value="2"><span class="name">Albania</span><span class="code">+355</span></option> <option value="3"><span class=...

Library for parsing XHTML files with XLINQ

When I realized I needed to create an index for approximately 50 XHTML pages, which may be added/deleted/renamed/moved in the future, I thought "No problem -- I'll write a quick index generator using LINQ to XML, since XHTML definitely counts as XML". Of course, as soon as I tried running it, I found out about the fact that XLINQ choke...

Embedding HTML in Flash using Deng

The Deng XML browser engine claims to be able to render XHTML within Flash objects. Does anyone have any experience using it in this capacity or could recommend alternative solutions? ...

Strict DOCTYPE affecting spacing between images.

I am having problems with my image spacing when I switched to XHTML Strict DOCTYPE. The following code - which uses Yahoo's reset stylesheet to kill off all default browser padding - leaves a gap of about 4 pixels between the two images below but ONLY when I use the strict doctype. Why is this? It is only a problem in Chrome and Firefo...

CSS text replace with image, need hyperlink

I am using the text-indent technique to replace my h1 tag with my website's image as so: <h1 title="Homepage">My logo</h1> #header h1 { float: left; background: transparent url('../images/logo.png'); width: 214px; height: 64px; text-indent: -9999px; } The only problem is that I want to still have the new image act as a hyperlink. I t...