Posts Tagged ‘xslt’

Absolute and Relative Path in XSLT

The following is observed from xslt version 1.0

1. There are two important nodes that we must always be sure about

“.” the current context node and
“/” document root not current context node root Read the rest of this entry »

Tags:

Node set and result tree fragment in xslt

Node set and result tree fragment are different types, while path evaluation can only be applied on node set, otherwise you will get error message like:

To use a result tree fragment in a path expression
Read the rest of this entry »

Tags:

Divs moved around after xslt transformation

Normally for xslt transformation closing tags wil collapse

<div id=”1”></div>

Will be rendered like

<div id=”1” />

This will not cause much of an issue until you have nearby empty divs like Read the rest of this entry »

Tags:

One Step Search Through XPath Query and Linq To Xml

As xml is main format of data exchange between systems, being comfortable of navigation of xml data is very important for xml handling. There are many ways a search can be performed on an xml document, but here I am trying to demo how to perform xml search using xpath query and linq to xml which in my view are two of the easiest and most clean way of handling complex xml data, the real scenario could be mix of both, I deliberately did this in order to show how each mechanism is working without each other and hoping that under some restrictive circumstances there is still one option left to use. Read the rest of this entry »

Tags: ,