I want to use copyright symbol in jspx, but it is not allowing me to use © . It is throwing me an error.
The entity "copy" was referenced, but not declared.
I googled it out and found that i need to modify escapeMode . But I do not know where I should change it.
Or anyone has the solution, please let me know.
You may need to find the section of your template and add the entity declaration.
Here's an example with a few common entities:
<!DOCTYPE html [
<!ENTITY nbsp " ">
<!ENTITY copy "©">
<!ENTITY bull "•"> ]>
Here is a list of the entities in HTML4
Related
The rule "title" should be present in all pages is present on the Web Profile of SonarQube. I understand the reason why it exists but I am facing a situation where nothing can be done - so far - to avoid its violation. Let me explain...
When developing using primefaces if the header in xhtml is declared as just "head" tag it does not include some artificats that belongs to the primefaces framework. So, a xhtml like is required
<h:head>
<title>something</title>
....
<h:/head>
But this violates the rule I mentioned in bold.
Maybe because it checks html and xhtml files... not sure.
My thought about that was:
to edit this rule so it would recognize as a complaint code a h:head, or;
change the extension files this rule scans, or;
as last case disable it;
Any ideas about what to do and how to do it?
So looking around to see if I could find the answer before posting but can't find any or I'm overlooking it but I tried validating an XHTML 1.0 Strict document. In the HTML code I have:
<span id="return">RETURN</span>
So, when I put the document through the validator, it says " there is no attribute "target"" and it gives an explanation of ". . . . you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead . . ." Though I'm willing to change the document type to "Transitional," but I'm more intrigued with the latter and wish to know how i can achieve this . . .
Validator instructions are quite clear I think. Opening in a new window is not possible with pure xhtml strict, only in xhtml transitional.
You could use JavaScript instead.
The other possibility mentioned aims for this CSS3 property i guess, which doesn't seem to work yet and is just some JavaScript replacement anyways.
But imho if you use CSS3 you don't need xhtml strict either, because a browser that can handle CSS3 is more than likely to also handle newer doctypes like html5.
/edit: Note that the thing with "marginheight" is just an example from the standard-errormessage which appears for several different problems.
Use XHTML5, you get the benefit of HTML5 elements along with the benefits of using the XML parser so just use the <!DOCTYPE html> as Mr Lister mentioned in his comment. My website / platform uses XHTML5 so if you're curious how the syntax should look either ask and/or visit the link in my profile. :-)
I want to provide the xml schema for custom tags and attributes, which are extending xhtml, so that I would have auto suggest in the IDE (I am using WebStorm) for standard html tags and attributes and for my custom. The namespace should not be used, so that as in the example below the name of the element is my-custom-element, but not my:custom-element.
I have achieved this with DTD have this:
<!ENTITY % XHTML1-strict PUBLIC "-//W3C//XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/html4/strict.dtd" >
%XHTML1-strict;
<!ELEMENT my-custom-element ANY>
Is it possible to do the same using xsd?
Update:
The above example is not correct, as new custom element is auto completed only outside of html tag
Use the HTML5 DTD from Komodo, which is an extension of the XHTML DTD, as a guideline for adding new elements. There are several tools to convert DTD2XSD and XSD2DTD, such as:
dtd2xsd.xsl
dtd2xsd.pl
xsd2dtd.xsl
Custom DTD
I was using XHTML on my website but that completely destroyed jQuery and its plugins.
Therefore, I want to go back to html 4. I am defining some custom attributes for my html, like so:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd" [
<!ATTLIST mytag myattribute CDATA #IMPLIED>
]>
This seems to be valid html for, but when I pass such a page from my server with a content type of text/html, my browser displays ']>' - it can't parse the doctype properly.
Is there a different content type I should be using?
From A List Apart
If you run such a file through the W3C validator, you find that it
validates wonderfully well. If you download the sample files for this
article and validate file internal.html, you can see this for
yourself. Unfortunately, when you display the file in a browser, the
]> shows up on the screen. There’s no way around this bug, so this
approach is right out.
So this basically isnt going to work. To get it to work you need to copy the DTD you want the server/local machine, edit it appropriately and put it in a publically accessible place. See the article for more detail.
As far as jQuery is concerned, it should work fine if you quit trying to customize the DTD in the fashion that you are. Im not sure about using a custom DTD as I have never done it, but just adding the attributes to the elements and not defining them in the DTD shouldnt cause a problem with jq. Granted the document wont validate, but validation is just a tool and not overly important in the grand scheme of things.
I generate an XHTML document and set the Mime type as "application/msword" so it opens in Word.
To create a header I appear to have to reference an external file thus:
<style>
...
#page{mso-footnote-separator:url("**OUT_files/header.htm**") fs;
mso-footnote-continuation-separator:url("OUT_files/header.htm") fcs;
mso-endnote-separator:url("OUT_files/header.htm") es;
mso-endnote-continuation-separator:url("OUT_files/header.htm") ecs;}
#page Section1{
mso-header-margin:.5in;
mso-header:url("OUT_files/header.htm") h1;
} }
...
</style>
Does anyone know how to reference a div defined within the main XHTML document itself, without having to reference an external file?
Thanks
MS Word is quite locked down. I was not able to get this to work with a non-external file, but it seems to make sense. The values being "included" are repeated in the display. It's not possible to have "hidden" divs and refer to them (at least, not when I was trying), so not sure how to get this to work properly.
For me, I ended up just creating a simple Macro that would handle this for me.
If you are very lucky, a data: URL might work, maybe, in Word 2007? I haven't tried that myself, but MS introduced partial support for data: URLs in IE8.