xslt

What Toolchains Support Passing in a Nodeset to an XSLT Transformation as a Parameter?

This is a followup to an answer on a previous question I had about XSLT. To recap, I didn't realize that without EXSLT, XSLT wouldn't let you dynamically create an xpath expression with string values. One of the suggested workarounds was to query the input document's DOM before you execute the transform, and pass the node-set into...

Overriding match="*" template from DocBook XSL

DocBook XSL includes a template that matches all element <xsl:template match="*"> <xsl:message> .... </xsl:message> </xsl:template> I need to override it with another template because my source XML tree contains more that just the DoocBook XML. If I specify such a template in the file it overrides all templates in DocBook XSL. It s...

JIT Compiler encountered an internal limitation. VS2008

I've been using XslCompiledTransform because Microsoft tells me I need to use as XslTransform is deprecated. <ExactDatetime>200-02-02</ExactDatetime>) works using XslTransform <ExactDatetime>200-02-02</ExactDatetime>) fail using XslTransform <ExactDatetime></ExactDatetime>) works using XslTransform Works: XslTransform xslDoc = new ...

Creating empty element if not exists

Hi friends hope all are doing well. I have a problem in my xml file i.e. in one set certain elements are exist and in next set it is not exists, so i want to create those elements which are not exist in the set. Below follows my xml file. Pls. help me. <Jobs> <Job> <Job_ID>80000000</Job_ID> <PositionID>60000002</PositionID> ...

XSLT conditional node selection

Here is my problem. I have a "menu" organized like this: <menutree> <menuitem name="Foo"> <menuitem name="Sub-Foo"> <menuitem name="Sub-sub-foo1"/> <menuitem name="Sub-sub-foo2"/> <menuitem name="Sub-sub-foo3"/> </menuitem> <menuitem name="Other-Sub-Foo"> <menuitem name="Other-Sub-sub-foo1"/> ...

Is there VS intellisense for Umbraco XSLT extensions?

Is it possible to get in Visual Studio code intellisense into XSLT extension functions. For example when I write: <xsl:value-of select="umbraco. I would get a list of all functions/methods available under "umbraco."? ...

How to get specific value from a denormalized XML using XSLT

Say I have an xml that looks like so: <Items> <ItemType1>A</ItemType1> <ItemValue1>100</ItemValue1> <IteType2>B</ItemType2> <ItemValue2>10</ItemValue2> <ItemType3>C</ItemType3> <ItemValue3>0</ItemValue3> <ItemType4>D</ItemType4> <ItemValue4>50</ItemValue4> </Items> And I'm interested in getting the content of ItemValue...

XSLT wont allow me to use self-closing img and br tags

I have some XSLT that gets rendered in the Sitecore 6 CMS, but I don't think that this issue is specific to the product. If I have a self-closing img or br tag, like so: <br /> <img src="your.example.com" /> The resulting output would be: <br> <img src="your.example.com"> The output method of the XSLT file is HTML. Is it supposed...

XSL Transform, select on prefix namespace ?

Hi, I am trying to select a node from the following xml that have prefix from namespace: <gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01"&gt; <Cube> <Cube time="2009-10-12"> <Cube currency="USD" rate="1.4765"/> ............................. the xsl I am using is (Updated): The original xml is at: http://www.e...

XSLT node Traversal

Here is a snip-it of the XML: <?xml version="1.0" encoding="iso-8859-1" ?> <NetworkAppliance id="S123456"> <Group id="9"> <Probe id="1"> <Value>74.7</Value> </Probe> </NetworkAppliance> I want to get the single point value of 74.7. There are many groups with unique ID's and many Probes under that group with unique ID's...

xslt1.0 variable problem

I have the following template: <xsl:template name="theday"> <xsl:param name="thisday" /> <xsl:variable name='holiday' select='foo'/><!-- made this static for testing --> <td class="{$holiday}"> <!-- no value is inserted in class --> <a> <xsl:attribute name='href'><xsl:value-of select="concat('?date=',$thisday)" /></xsl:at...

Creating empty element if not exists

Hi Friends, thanks a lot for giving me response and help. My problem is in my xml file some elements are missing in some xml set and in some other they exists. So, if these elements are not exists i want to create only elements with value 0. Earlier i got answer from the well known advisor, which i have implements but not getting the req...

XSLT - Add space after lowercase followed by Uppercase letter

I have a simple string say: NiceWeather I'd like to insert a space between 'e' and 'W' to produce: Nice Weather Is there any function I could use (XSLT 1.0) to put the space in? ...

Can an XSLT parse a string of text?

This is my first time using XSLT. I'm trying to create a file that will convert an XML data file exported from a program I use to an HTML report. One of the element's value is path to an image file, but the path generated is an absolute path such as C:\Documents and Settings\me\Desktop\xml export\cd000402.jpg but I want a relative pa...

How to remove root element from xml file.

Dear Friends good afternoon. My problem may be this is very basic one i.e. how can we remove root element from a xml file using xslt. Xml file example given below. <Result> <Jobs id="1"> <Job ID="000000" PositionID="0000"> <Title>Development Manager - Investment Banking - Equities Business</Title> <Summary><![CDATA[An experien...

Java, xml, XSLT: Prevent DTD-Validation

I use the Java (6) XML-Api to apply a xslt transformation on a html-document from the web. This document is wellformed xhtml and so contains a valid DTD-Spec (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;). Now a problem occurs: Uppon transformation the XSLT-...

WYSIWYG editor for XSL transformed XML (outputting back into XML)

I have just found this: http://msdn.microsoft.com/en-us/library/ms977865.aspx This MSDN article describes Microsoft Internet Explorer 6 behavior used to implement a demo WYSIWYG XML document editor, shows features that make WYSIWYG XML content editing easy and familiar to word processor users, and makes native XML editing available ...

Can an XSLT insert the current date?

A program we use in my office exports reports by translating a XML file it exports with an XSLT file into XHTML. I'm rewriting the XSLT to change the formatting and to add more information from the source XML File. I'd like to include the date the file was created in the final report. But the current date/time is not included in the ori...

styling based on element attribute ?

I'm transforming xml into wordml using xslt. I would like to be able to format content of table cell differently if attribute of element that carries content of that cell is different. For example, I have following xslt: <xsl:template match="/ns0:RootElement/ns0:Items/ns0:Item0"> <w:tc> <w:tcPr> <w:tcW w:w="2268" w:t...

XSLT Set difference but matching on a subsection of the node

Hi, I've implemented this in a recursive fashon but as most xml editors seem to run out of stack space I thought there should be a more efficient solution out there. I've looked at Jenni Tenison's set difference template: http://www.exslt.org/set/functions/difference/set.difference.template.xsl but need something slightly different. I ...