xhtml

Spawn a image on another image giving a coordinate

核能气质少年 提交于 2020-06-16 06:04:14
问题 I have some image coordinates and I want to use them to put a small image on those with javascript. Can this be accomplished with javascript or I need to create the div and modify it's css attributes? By the way: the image can be placed anywhere on the page. 回答1: Here is a fully working code: Live Demo CSS .overlays{ position:absolute; } JS function showImage() { // myImage : ID of image on which to place new image var image = document.getElementById('myImage'); console.log(image.width);

namespace attributes not present in .outerHTML

*爱你&永不变心* 提交于 2020-06-01 05:25:43
问题 In HTML5/JavaScript, if I create a namespaced dom node programmatically, like so: svgElt = document.createElementNS("http://www.w3.org/2000/svg", 'svg') the node 'knows' it's own namespace, which I can retrieve like so: svgElt.namespaceURI // result: "http://www.w3.org/2000/svg" But the namespace is not treated as a "normal" attribute: svgElt.getAttribute('xmlns') // result: null So the behavior of the programmatically created node is different from the equivalent "straight" node <svg xmlns=

Complete list of XHTML, MathML, and SVG modules and other entities, with public identifiers?

泪湿孤枕 提交于 2020-04-17 22:43:25
问题 The XHTML 1.1 modular specification https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd references various modules which, in turn, reference other entities, in all pulling in entity reference definitions, DTDs, etc. In addition other DTDs such as https://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd pull in all sorts of MathML and SVG entities, which in turn reference other entities. Is there some place that simply lists all the XHTML/MathML/SVG entities by public ID (e.g. -//W3C//ELEMENTS

Complete list of XHTML, MathML, and SVG modules and other entities, with public identifiers?

Deadly 提交于 2020-04-17 22:40:55
问题 The XHTML 1.1 modular specification https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd references various modules which, in turn, reference other entities, in all pulling in entity reference definitions, DTDs, etc. In addition other DTDs such as https://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd pull in all sorts of MathML and SVG entities, which in turn reference other entities. Is there some place that simply lists all the XHTML/MathML/SVG entities by public ID (e.g. -//W3C//ELEMENTS

Typo in XHTML 1.1 style sheets module?

随声附和 提交于 2020-04-17 20:27:21
问题 The XHTML 1.1 modular DTD at https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd defines the style module like this: <!-- Style Sheets Module ......................................... --> <!ENTITY % xhtml-style.module "INCLUDE" > <![%xhtml-style.module;[ <!ENTITY % xhtml-style.mod PUBLIC "-//W3C//ELEMENTS XHTML Style Sheets 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-style-1.mod" > %xhtml-style.mod;]]> But the actual file at http://www.w3.org/MarkUp/DTD/xhtml-style-1.mod defines the public

What is difference between XHTML and HTML? [closed]

谁都会走 提交于 2020-03-12 07:18:04
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . What is the exact difference between HTML and XHTML? I have seen related posts here, but I am not getting it exactly. 回答1: XHTML is

How can I force iPhone’s Safari to use media=“handheld”?

丶灬走出姿态 提交于 2020-02-23 04:07:51
问题 Is there a way to force to iPhone’s Safari to use media="handheld" in place of media="screen" ? 回答1: You can't. Safari intentionally disregards media=handheld, as such stylesheets were typically tailored to pre-iPhone handhelds with much lower capabilities, and would therefore result in a poor low-quality version of the page. However, you can direct Safari to use specific stylesheets using conditional css. 来源: https://stackoverflow.com/questions/2123091/how-can-i-force-iphone-s-safari-to-use

Can we access session scope variables directly in JSF xhtml files

倖福魔咒の 提交于 2020-02-20 08:26:10
问题 Hi I am working on a JSF project, I will like to access some session level variables onto my xhtml UI pages directly without using any managed bean. Just wanted to know if this is possible and if yes than how? Thanks 回答1: Yes its possible If the bean doesnot exits then put it in session first FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(key,object); And to use the bean on xhtml page use <h:outputText value="#{sessionScope.key}" /> 来源: https://stackoverflow.com

Polyglot-Markup validator

霸气de小男生 提交于 2020-02-20 05:54:48
问题 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. 回答1: 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

Relative paths in Flying Saucer XHTML?

こ雲淡風輕ζ 提交于 2020-01-31 08:46:48
问题 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