How to define HTML xmlns for HTML 5? - asp.net-4.0

<html xmlns="http://www.w3.org/1999/xhtml">
This is common for below HTML 5 standard.
In my application i have implemented HTML 5.
so what XML namespace have to be used? is this mandatory across browsers?
Help me guys!

There's no need for an xmlns declaration in an HTML5 document, unless you're using the XML serialisation, in which case <html xmlns="http://www.w3.org/1999/xhtml"> is still fine.

Related

How to create uneditable / locked regions in templates in IntelliJ IDEA

I have created a template file in my project which I want to apply to almost all pages in my website/project.
Ideally I would like there to be editable regions and uneditable/locked regions in the template, so that when I update the code in the template it should update all the uneditable regions in the pages that use this template.
For example, in Dreamweaver, you can do this:
<!doctype html>
<html lang="en">
<head>
<title>
<!-- TemplateBeginEditable name="title" -->
<!-- TemplateEndEditable -->
</title>
<head>
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>
The <title> and <head> areas remain editable for any page and won't be overwritten when a template file code changes. However if I was to remove the <html> tag then that would be removed for all pages using the template.
Can I achieve this in IntelliJ IDEA at all?
In IntelliJ IDEA consider using Structural Search and Replace - to find and replace some common code pattens or code templates. See Searching for XML and HTML tags, attributes, and their values for examples.

Custom live template does not show up in xhtml JSF file

I am using IntelliJ 2017.2 ultimate edition and I have created a live template to surround text in xhtml (JSF) by a tag and attribute.
#{myvalue}
should become
<h:outputText value="#{myvalue}" />
I created a live template named "swot" applicable to in XML : XML Text.
<h:outputText value="$SELECTION$" />
Unfortunately, it does not show up when I try to surround a selection in a xhtml file. I only get standard live templates.
Update with solution
As the file in which I want to applicate the template is JSF xhtml file, I just had to applicate it to "JSP"
As the file in which I want to applicate the template is JSF xhtml file, I just had to applicate it to "JSP"
Setting the applicability to HTML should solve your issue. Please see below image:

CFDocument PDF not showing Japanese data

I have created a pdf with Japanese content using CFDocument. But It does not showing the Japanese data. I have used pageEncoding as utf-8. It showing only blank space instead of Japanese data.
I have used the following code,
<cfcontent type="application/pdf">
<cfheader name="Content-Disposition" value="attachment;filename=test.pdf">
<cfprocessingdirective pageencoding="utf-8">
<cfdocument format="PDF" localurl="yes" marginTop=".25" marginLeft=".25" marginRight=".25" marginBottom=".25" pageType="custom" pageWidth="8.5" pageHeight="10.2">
<cfoutput>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PDF Export Example</title>
<style>
body { font-family: Verdana; }
</style>
</head>
<body>
<h1>PDF Export Example</h1>
<p>担当するクライエントの大半は様々な規模の企業だが、カナダの大学や政府関連の研究機関の担当経験もある。
</p>
<h1>PDF Export English Example</h1>
<p>This is an example.
</p>
</body>
</html>
</cfoutput>
</cfdocument>
Please help!
It seems Verdana's implementation when used in PDF doesn't support Chinese / Japanese. However it looks like MingLiU does. I just changed it to use that font, and everything worked OK via ColdFusion 10. It still didn't work in Railo, but I assume that's a Railo problem, not a PDF / font problem.
So, anyway, just use a font that specifically supports the glyphs you need to render.
Something I ran into years ago.
In order to have the Chinese or Japanese characters rendered up
correctly in PDF using and , you should first check what's your
default locale at ColdFusion Administrator -> Setting Summary -> Java
Default Locale. One would have thought CFML will respect custom
locale using setLocale(), but it doesn't.
If it is "en_US", edit /lib/cffont.properties. Otherwise, create a
/lib/cffont.properties.#locale#(e.g. /lib/cffont.properties.zh_TW )
using cffont.properties as reference.
Replace the font(s) after '=' with system's Chinese font (e.g.
MingLiu) for Chinese or system's Japanese font (e.g. MS UI Gothic) for
Japanese respectively, assuming ColdFusion is installed on Windows,
and client has the respective font(s) installed.
http://henrylearnstorock.blogspot.ca/2010/08/how-to-render-chinese-japanese.html

Grails Resources Plugin resource scope

I am struggling to understand the scope of resources defined with the Grails resources plugin.
I have created a small project (Grails 2.0.4) with a single domain item of Book and generated the associated Controller and Views.
I have then modified the main layout as follows:
<html>
<head>
<g:layoutTitle/>
<r:layoutResources/>
</head>
<body>
<g:layoutBody/>
<r:layoutResources/>
</body>
</html>
When I run the app I get no styling as expected.
I now add the following to the head list.gsp
<head>
<meta name="layout" content="main"/>
<r:require modules="jquery-mobile"/>
</head>
When I go to the list page now I correctly get the jquery-mobile styling as expected but when I go to the create page I also get jquery-mobile styling but was expecting no styling, as this page does not contain the tag.
It seems that the resources selected for one page are being used for all other pages. Is this expected behaviour?
Thanks,
Kim
Use Resources 1.2, it sounds like this might be an old bug.

landscape fixed layout epub 3 viewing only 1 page at a time starting from indesign file

I am creating an indesign cs6 epub3 fixed layout with landscape only mode, viewing only one page at a time.
I added the meta
<meta property="rendition:layout">pre-paginated</meta>
<meta property="rendition:orientation">landscape</meta>
<meta property="rendition:spread">none</meta>
and I also specified the width and height in css and each xhtml file with
<meta name="viewport" content="width=1024, height=768" />
I want the document to appear as one landscape page only, not as a two sides book. Does anyone know how to achieve that?
Ensure that the package element within the .opf file includes version="3.0" and prefix="rendition: http://www.idpf.org/vocab/rendition/#.
e.g.
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="3.0" prefix="rendition: http://www.idpf.org/vocab/rendition/# ibooks:http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/">
See Liz Castro's blog post on fixed layouts for more info.
http://www.pigsgourdsandwikis.com/2012/05/readium-displays-fixed-layout-epub-on.html