Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts

10 May 2012

How to post HTML or XML in blogs

While writing tutorials or asking a question, sometimes it becomes very necessary to post html and javascript codes in your blog comment forms powered by Blogger. You have seen many authors posting HTML effectively but when some of you try to do it, you get an error. This is because Blogger Comment form doesn't support direct posting of HTML and JavaScript. In order to help you to do that we will need to change/encode the same code into a text and then post it effectively without any error. The Tool below will help you to change HTML characters to simple text, which could be easily inserted in your blogger template and comment form. You can also use it to convert your adsense code into an embeddable form. It converts special characters in this way,
'<' becomes '& l t ;' '>' becomes '& g t ;'
'"' (double quote) becomes '& q u o t;'
''' (single quote) becomes ' & # 0 3 9 ;'
'&' becomes '& a m p;'

Use URL : http://centricle.com/tools/html-entities/

To convert the HTML/XML codes

12 May 2010

XSLT Elements Reference


























































































































































































































Element Description IE FF
apply-imports Applies a template rule from an imported style sheet 6.0 1.0
apply-templates Applies a template rule to the current element or to the
current element's child nodes
5.0 1.0
attribute Adds an attribute 5.0 1.0
attribute-set Defines a named set of attributes 6.0 1.0
call-template Calls a named template 6.0 1.0
choose Used in conjunction with <when> and <otherwise> to
express multiple conditional tests
5.0 1.0
comment Creates a comment node in the result tree 5.0 1.0
copy Creates a copy of the current node (without child nodes and
attributes)
5.0 1.0
copy-of Creates a copy of the current node (with child nodes and
attributes)
6.0 1.0
decimal-format Defines the characters and symbols to be used when
converting numbers into strings, with the format-number() function
6.0 1.0
element Creates an element node in the output document 5.0 1.0
fallback Specifies an alternate code to run if  the
processor does not support an XSLT element
6.0  
for-each Loops through each node in a specified node set 5.0 1.0
if Contains a template that will be applied only if a
specified condition is true
5.0 1.0
import Imports the contents of one style sheet into another. Note:
An imported style sheet has lower precedence than the importing style sheet
6.0 1.0
include Includes the contents of one style sheet into another. Note:
An included style sheet has the same precedence as the including style sheet
6.0 1.0
key Declares a named key that can be used in the style sheet with the key() function 6.0 1.0
message Writes a message to the output (used to report errors) 6.0 1.0
namespace-alias Replaces a namespace in the style sheet to a different
namespace in the output
6.0  
number Determines the integer position of the current node and
formats a number
6.0 1.0
otherwise Specifies a default action for the <choose> element 5.0 1.0
output Defines the format of the output document 6.0 1.0
param Declares a local or global parameter 6.0 1.0
preserve-space Defines the elements for which white space should be
preserved
6.0 1.0
processing-instruction Writes a processing instruction to the output 5.0 1.0
sort Sorts the output 6.0 1.0
strip-space Defines the elements for which white space should be
removed
6.0 1.0
stylesheet Defines the root element of a style sheet 5.0 1.0
template Rules to apply when a specified node is matched 5.0 1.0
text Writes literal text to the output 5.0 1.0
transform Defines the root element of a style sheet 6.0 1.0
value-of Extracts the value of a selected node 5.0 1.0
variable Declares a local or global variable 6.0 1.0
when Specifies an action for the <choose> element 5.0 1.0
with-param Defines the value of a parameter to be passed into a
template
6.0 1.0






« PreviousNext Chapter »

06 May 2010

How Do I Get XSLT to Work in a Browser?

An XSLT processor is probably readily available to you on your computer desktop in the form of a web browser: Microsoft Internet Explorer (IE) Version 6, Netscape Navigator (Netscape) Version 7.1, Mozilla Version 1.4, or Mozilla Firebird 0.7. Each of these browsers has client-side XSLT processing ability already built into them.

The way to apply an XSLT stylesheet like msg.xsl to the document msg.xml in a browser is by using a processing instruction. A processing instruction (PI) allows you to include instructions for an application in an XML document.

You can see a processing instruction in a slightly altered version of msg.xml, which I call msg-pi.xml:

<?xml-stylesheet href="msg.xsl" type="text/xsl"?>
<msg/>


The XML stylesheet PI should always come before the first element in the document (the document element msg in msg-pi.xml). The purpose of this PI is similar to one of the purposes of the link tag in HTML, that is, to associate a stylesheet with the document. Save msg-pi.xml in a text file with the other files. If you open msg-pi.xml in one of the browsers I mentioned, the built-in XSLT processor in the browser will write the string Found it! on the browser's canvas or rendering space.