xslt

xslt list marker styles

How can I handle bullet styles other than numbers in XSLT. I want to draw a table ( XAML flowdocument) and put rows as bellow. hierarchically indented and special marker style. Not using in (XAML)FlowDocument. 1. Some text......................... a. Some text..................... [1]. Some text................ a....

XPath Node to String

How can I select the string contents of the following nodes: <span class="url"> word <b class=" ">test</b> </span> <span class="url"> word <b class=" ">test2</b> more words </span> I have tried a few things //span/text() Doesn't get the bold tag //span/string(.) is invalid string(//span) only selects 1 node I am using ...

.net 4 xslt transformation Extension Function broken

I'm in the process of upgrading an asp.net v3.5 web app. to v4 and I'm facing some problems with XSLT transformations I use on XmlDataSource objects. Part of a XSLT file: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HttpUtility="ds:HttpUtility"> <xsl:output method="xml" indent="yes" encoding="u...

How to detect content of XML nodes with same name during XSL "apply-template"

It's been a while since I've done any XSL, so forgive me if this is a little confusing. I have an XML file, which I need to transform with XSL. It all works well until I try and detect "category", because there are multiple "category" nodes for each item. Part of XML file: <ROOT> <blog day="20" id="4" live="201007200947" month="7" mo...

Why does an element appear twice after transformation?

I'm working with Perl and XSL. I try to change value of <Interval> to some number in an XML file. My XML looks like this: <?xml version="1.0"?> <Config> <Enabled>false</Enabled> <Interval>5</Interval> </Config> My XSL looks like this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w...

How do I escape a character in XSLT

I have an XSLT that transforms a XML to PLSQL I need to escape the character: > (greater than) ex: P_C710_INT_PROFILE_ID => I tried using &gt; and putting the character in xsl:text with no luck Any ideas? Thanks ...

Umbraco, XSLT, How do I render child content in a parent page?

I have content that I've structured as follows in the content section in umbraco: Items under the content node that have a folder icon are Content Pages. A content page can have another content page as a child or a content section which are the items with doc with image icon. I have a settings section that I've structured as follows:...

Limiting string length in XSLT

I have node set with header, leading, body text etc... I want to make an excerpt and show only the first 70 characters of the leading. Is there a way to do this in XSLT? ...

Dynamically decide which XSL stylesheet to use

I'm trying to create a site which (among other things) will display data which is contained in xml files. I'm using xsl stylesheets to format everything, but some of the pages have similar content. Rather than have to make multiple xml sheets with duplicate data, is there a way to tell the xsl where the data is being displayed and have i...

replace selected escaped characters from the xml data

Hi All, I am very new to XML data processing, please help me building the XSLT code for replacing the selected escaped characters, Replace &gt; with > &lt; with < Thanks in advance. ...

Empty XML split out default XML

I have a XML passing to the XSL which gives the standard output. There is chance that i will get the XML as empty some times based on some cases. Is there any way if we have empty XML and get the standard or default out put in XSL ? ...

XSL 1.0 Distinct via Munchian and multiple match modes

Learning XSL, relegated at this time to XSL 1.0, trying to produce a distinct set as well perform subsequent pass using match modes constructs. If the modes are not introduced all is well. As soon as modes are introduced the translation fails. Any help would be appreciated. Exempliary xml: <?xml version="1.0" encoding="UTF-8"?> ...

Equivalent for Variable with select expression and non-empty content in XSLT 1.0

Hello, I have one template (which I cannot change but have to use), that processes the currently selected node, it might look like this (heavily simplified): <xsl:template name="foreignTemplate"> <xsl:value-of select="." /> </xsl:template> In XSLT 2.0 I could do something like this to bind "." in that template to an arbitrary var...

.net 4 xslt extension objects

Hi, I'm in the process of upgrading an asp.net v3.5 web app. to v4 and I'm facing some problems with XSLT transformations I use on XmlDataSource objects. Part of a XSLT file: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ExtensionObject="ds:ExtensionObject"> <xsl:output method="xml" indent="ye...

xslt1.0 replace is not working

I have URLs with some special characters and i would like to replace them and I am using xslt 1.0 so I am writing the code as below. <xsl:template name="string-replace-all"> <xsl:param name="text"/> <xsl:param name="replace"/> <xsl:param name="by"/> <xsl:choose> <xsl:when test="contains($...

XSL sort functionality

<xsl:apply-templates select="$tempPosterItemNodeSet/CurrentPosterItemCollection/PosterItem" mode="PosterItem"> <xsl:sort select="$tempPosterItemNodeSet/CurrentPosterItemCollection/PosterItem/Property[@name='WidgetID']" data-type="number"/> </xsl:apply-templates> I need to xslt sort a nodeset that I am passing ...

How to check whether an element name contains a specific string?

The source document like this: <a> <b n=n1n1n1n1> <c1> drftgy </c1> </b> <c2> dddd </c2> </a> how to check if the element name = c then we will do something... ...

JSF 2.0 custom components with XSLT

Is it possible to write own JSF 2.0 components with help of XSLT? ...

Saxon 9.2 / Java / XSLT: setting transformer parameters using setParameters()

Hi all, I have the following XSLT 2.0 template: <xsl:template name="t1"> <xsl:variable name="totalpos" as="xsd:double" select="$currentTotal"/> .. I am struggling to programmatticaly provide currentTotal as a parameter to the transformer, like this: transformer.setParameter("currentTotal", new Double("100")) .. but without any posi...

How to get image path for <img src="?"> tag from XML file

I'd like to use an xml file <pics> <pic no="1">c:\pic1.jpg</pic> <pic no="2">c:\pic2.jpg</pic> <pic no="3">c:\pic3.jpg</pic> <pic no="4">c:\pic4.jpg</pic> <pic no="5">c:\pic5.jpg</pic> .... </pics> in an html table: <table cellspacing="2" cellpadding="2" border="0"> <tr> <td><img src="" width="150" height=...