xslt

Sharepoint XSLT Dynamic filtering

I'm trying to create a dynamic row filter based on a variable. I have the following code: <xsl:variable name="filter" select="contain(@Title, 'title1') or contain(@Title, 'title2')"/> <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[string($filter)]" /> This unfortunately doesn't seem to work and I end up with all rows. I'm...

XSL global value assignment

i have declare one XSL variable I wanted to chage value of that variable dynamically ex. var X = 0 if i wanted to reassing X = 100. It only assign first value to variable , how can i do that in XSL for global assignment of values? ...

What is a good templating engine?

What is a nice templating engine to use in C#? I have XML or JSON as structured datasource. This data needs to be presented to users on the web in strict XHTML. I've been using XSLT mostly, but maybe there are more or better options? It needs to be used in C# or IronPython. ...

HTML entities do not render correctly in browser after XSLT transform

I have the following XML: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <example> <contactInfo> <id>12319221</id> <name>Jerry P</name> <market> <name>Test</name> <phone>800.555.1010</phone> </market> <agent> <name>Test User</name> <emai...

XSLT escaping characters for XML attributes

I am working in a framework (cocoon) which means that the pages after I produce them are re-transformed by processes I have little or no control of. What I am doing is making a web service call, then transforming the results into an HTML page for presentation. Sounds like a job for XSLT. Everything works fine, until the data returned ...

using xml param inside a function

Having declared <xsl:param name='suffix'>some_string</xsl:param> I tried to use its value in a function call like this <xsl:when test='fn:ends-with(@name, {$suffix})'> which ended with the following error: XPST0003: XPath syntax error at char 20 on line 34 in {fn:ends-with(@name, {$}: Unexpected token "{" in path expr...

Grouping problem in XSLT

I need to group the following XML doc to show: Parent Item Qty ---------------------------------- TopLevelAsy 1 SubAsy Part15 4 Top Assembly Part19 2 Top Assembly Part15 2 Top Assembly SubAsy 2 But what I get using my XSL is: Parent ...

XSL: How to test if the current node is a descendent of another node.

Hi, I'm pretty new to XSLT, but need to use it for a CMS using at the moment. I've already come up with a problem, but I'll try to describe my it without going into too much information about the underlying CMS. If you need more context to help me, I can add it in. So all I want to do is test if a node of my xml is a descendant of a pa...

In XSL how to you make a block take up a whole page?

In xsl / fop how do you make a block take up exactly the whole page ? Is there something like height = 100%? I want the first page of my pdf to contain a block with dynamic summary that can be a couple of lines only so I don't want the rest of the pdf blocks to be come up on the first page. ...

Which is faster, XML + XSL or CLR + DataBinding

Which is faster, XML with XSLT or CLR with DataBinding? I'm assuming that it's CLR + Databinding but I could be wrong. ...

mime type for text file through xslt

I just want to know that what is the MIME type i need to give if i am generating text file from xml using xslt? ...

How to generate a text file using XSLT

I want to generate a text format file using XML and XSLT using Java. I know how to generate PDF format, but I have no idea about generating text format, i.e. what packages are needed, what are the changes needed in XSLT? If anybody can provide the sample for this it would be a great help for me. ...

How to pass the value to a user-defined function in XSLT

I want to pass the value of employee_name that I get from XML to a user-defined function in XSL. Please see the code below: <xsl:for-each select="employees/employee"> <xsl:value-of select="employee_name"/> <xsl:value-of select=" my:compareCI( '--how to pass employee_name Value--', '--how to pass employee_name Value--...

C# XSLT: How to debug this error ?

I have to include a C# script in my XSLT file .. So as to calculate the difference between two dateTime values(and add it to some other values) .. I need to accept all the possible formats of date .. I was suppose to do it with XSLT .. but as XSLT doesn't allow to do it (implicitely) .. I found this remedy of calling a C# script .. I ha...

Test for Descendant Items

I am trying to create a simple inventory of items in a Sitecore website using an xslt. The problem is that I can't find a way to test whether an item has descendant items beneath it. It's easy to get the top level set like this: <xsl:template match="*" mode="main"> <table width="100%" class="alternating"> <xsl:for-each select="./it...

Xslt - Enforcing @attribute uniqueness.

I rarely work with xslt's so I'm not the greatest at it, but, I was wondering how to go about solving this problem: <Element> <childElement type="type1">Bob</childElement> <childElement type="type1">Smith</childElement> <childElement type="type2">Bob</childElement> </Element>" I want to enforce @type uniqueness, where I would...

XSLT - Accessing Key's by index - For example, in Muenchian Grouping

<listings> <property rln="r317080" firm="f102" agent="a2140"> <street>2638 Maple Avenue</street> <city>Padua</city> <state>WI</state> <zip>53701</zip> <price>229000</price> <style>2 Story Contemporary, Transitional</style> <sqfeet>2328</sqfeet> <bathrooms>2 1/2</bathrooms> <bedroom...

Zend Framework And XML/XSLT Integration

Hello, I'm trying to use XML files and XSL stylesheets instead of ordinary phtml templates in Zend Framework. I'm not sure how to implement it, though. What I've tried to do so far: instead of .phtml views I use .xsl stylesheets I use .xml layouts Here is what I do in the init() method of each controller: $this->view->xmlStyleshee...

Should I be using XML + Stylesheets vs. XHTML and CSS?

I have been developing web apps for a while now and for the past year I have been really exploring as many technologies as possible. I know some people are creating pages using XML and XSLT or maybe css style sheets; however, it seems to me that the trends are still not moving in direction. Plus it seems less functional/easy than XHTML/C...

XSLT not working properly

Hi everyone, I have an XML file that I want to transform using an XSLT. It only works when I remove all the attributes from the following part of the XML file: <DiscoveryClientData xmlns="http://www.frontrange.com/centennial/discovery" SchemaVersion="0.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocat...