xhtml

Inserting HTML into Word Using OpenXML

偶尔善良 提交于 2019-12-25 01:08:08
问题 I have some HTML stored in a database that I want to insert into a Word document using DocumentFormat.OpenXml. Inspired by the article here, I tried the following code. mainPart.AddAlternativeFormatImportPart(AlternativeFormatImportPartType.Xhtml, String.Format("<html><body>{0}</body></html>", html)); But this gives me the following error. '(My HTML Here)' ID is not a valid XSD ID I really don't understand this error. Does anyone know what I'm doing wrong? Also, my biggest concern about this

Is the “data” attribute a standard attribute of the XHTML Strict Doctype?

跟風遠走 提交于 2019-12-25 00:52:17
问题 Like the title says, I'm trying to determine if data is a standard attribute in the XHTML strict doctype. I can't seem to find any information online (looks like its HTML-5ish). 回答1: If you're talking about attributes with the data- prefix, that's indeed HTML5 only. If you want to use them in XHTML, you'd need XHTML5. There is also an attribute whose name is just data . It's for <object> elements and works like the src attribute on images. It's part of HTML4 and XHTML1 in both Strict and

standard Xhtml- div vs li

我与影子孤独终老i 提交于 2019-12-25 00:34:42
问题 I need ur suggestion in the following scenario. Lets say I have an UI something like Col1 Col2 A D B E C F Now to get this right now in my HTML I am using ..like <div class="col1"> <div>A</div> <div>B</div> .......... </div> <div class="col2"> <div>D</div> <div>E</div> .......... </div> But here I am using too much div..is it OK as per standard XHTML or should I use <li> ? Can somebody suggest with proper explanation, or maybe something else? Note: No use of Table Thanks. 回答1: It looks to me

XML to XML with XSLT- Add, Remove, Modify Elements and Attributes

人盡茶涼 提交于 2019-12-25 00:24:47
问题 I want to change from one XML (XHTML) file to another using XSLT. In the new XML file I have to remove/add/modify some elements. So for that I created one identity.xsl file, which copies the entire source file and then I created a new XSLT which includes identity.xsl and then in that new XSLT I'm trying to do the modifications. I'm able to eliminate a few attributes, which are not required, by passing a template match which does nothing but I'm unable to add the new attributes in the existing

XML to XHTML using XSLT: using entities such as &Sum; (which is a MATHML entity)

二次信任 提交于 2019-12-24 20:41:58
问题 Say I have an XML file test.xml which contains (among other things) some MATHML: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="template.xsl"?> <equation> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <row> <!-- Using a MATHML entity name here! --> <mi>&Sum;</mi> </row> </math> </equation> I would like to use a browsers XSLT engine to convert the test.xml into XHTML+MATHML and display it. My XSLT file template.xsl looks like this: <?xml

Replace carriage return in an email

早过忘川 提交于 2019-12-24 17:23:59
问题 I'm trying to replace carriage returns with a line break in PHP so that my site moderators don't have to type every time they want to add a new line when typing an email from my site. I've tried several different methods to replace the line breaks but none have worked. The methods that I have tried are: preg_replace('/\r\n?/', "<br />", $str); eregi_replace(char(13), "<br />", $str); str_replace("\r\n", "<br />", $str); str_replace("\n", "<br />", $str); and the nl2br function. I've looked

Is this possible in XHTML: tags in a title-attribute?

拈花ヽ惹草 提交于 2019-12-24 17:22:36
问题 I got following code in an XHTML-document and every browser saysit is malformed :( <a class="tooltip" title="Um nach einem <b>Datensatz zu suchen</b>, können Sie mehrere Suchbegriffe auf einmal eingeben!<br /> Um <b>Zeilen zu löschen</b>, selektieren Sie diese bitte und klicken dann auf <i>'Zeile(n) löschen'</i>.<br /> Um <b>einen Datansatz zu bearbeiten</b>, klicken Sie einfach zweimal auf die Zelle und dann auf <i>'Done'</i>.<br /> Um <b>eine Zeile hinzuzufügen</b>, klicken Sie auf <i>

Styling HTML select element

≯℡__Kan透↙ 提交于 2019-12-24 15:57:38
问题 I have tried everything to remove the default down arrow button from the the SELECT element, but couldn't succeed yet. I have also tested the background image, that shows behind the default button. And even tried by making NONE as Background, but it's not working for me. How can I style a select element so the arrow does not appear? 回答1: It's impossible to do in all browsers (reliably) without a JavaScript workaround. Not to mention, if you're not careful it will provide a bad UX. The one I

JavaScript Form Validation

情到浓时终转凉″ 提交于 2019-12-24 13:55:12
问题 I'm trying to create a form submission and before the form is submitted, I want to verify the credentials. I have both this so far HTML formatted for XHTML <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title> Registration Form</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta name="description"