xslt

XSLT Firefox Problem

Hello! I would greatly appreciate if someone could shed light as to why this http://www.binarymark.com/Products/BiorhythmCalculator/bioreport.aspx?day=1&month=1&year=1971 renders perfectly in Opera, IE, Chrome, but fails completely in Firefox 3.1 and 3.5 beta 4? What's wrong with XML/XSLT? Thanks. ...

Bypassing namespaces while copying an XML with XSLT

Starting from an XML with a default namespace: <Root> <A>foo</A> <B></B> <C>bar</C> </Root> I apply an XSLT to remove the 'C' element: <?xml version="1.0" ?> <xsl:stylesheet version="2.0" xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; <xsl:output method="html" indent="no" enc...

.NET Xslt Transformation, is this really streamed?

Hi. I have an XML that I need remove empty elements from, I am trying to avoid using DOM and trying to do this as streams. I have this code, but I am not entirely sure how correct and optimized this is. StringBuilder xslt = new StringBuilder(); xslt.Append(@"<?xml version=""1.0"" encoding=""UTF-8""?>"); xslt.Append(@"<xsl:stylesheet ver...

How do I display XML using an XSLT document, in a Delphi app?

I've been given a sample XML file (ultimately my client will receive several of these each day), and an XSLT file which will apparently transform the XML into something with a meaningful layout, suitable for displaying in a browser or printing. I'd like to put something into an existing legacy Delphi app, such that the user can pick one...

Selecting set of nodes by id in umbraco

Is there a more direct way in umbraco to iterate nodes based on a list of IDs than this? $currentPage/ancestor-or-self::root/descendant::node[contains($idList, @id)] I'm just curious. It seems akward to traverse up the tree from the currentPage node to find the root before traversing back down. ...

Javascript better way to identify node of callback than XSLT generate-id() on another attribute.

The init() is able to use the parameter passed to it in this example: <body onload="init(this);"> testdOnChange() in this example uses a more complicated technique with XSLT generate-id(): <testd:test testd_id="TESTD_ID_id0x03cc1988" testd_on_load="testdOnChange(testdGetElementById('TESTD_ID_id0x03cc1988'));" /> Is t...

How to resolve XSL includes in a Transformation that loads XSL from a String?

.NET 2.0/VS2005 I am trying to use the XslCompiledTransform class to perform a XSL Transformation. I have two XSL files, the first of which includes a reference to the other in the form of an <xsl:include> statement : Main.xsl: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; <xsl:include href="Incl...

XSLT Tester

does anyone know of an online XSLT tester.. i.e. you provide the xml/xslt and it tells you the output... I know i could write one, but i'd like a solution that i have to write and that is available online.. (: ...

Multiple element/attribute sorting in XSL

Hello Again, I am trying to sort several levels of data using a XSL document. I got it to work but it is using a bunch of recursion. I am trying to avoid this because I figured using multiple sorts withing a single node shold have worked. Is there a way to change the XSL below to be less recursive? I am sorting on USER/USERID, then R...

Show the header only once in a for-each

Hi, Say I have the following XML: <a> <b>1</b> <b>2</b> <b>3</b> </a> ... and require: Header 1 2 3 ... but an xslt like: <xsl:template match = "/" > <xsl:variable name="headed" select="false()"/> <xsl:for-each select = "a/*" > <xsl:if test="not($headed)"> <xsl:text>Header</xsl:text> <!-- this...

XSL to Group item

Hi, I have a set of Sitecore nodes: <item> <item> <item /> </item> <item /> <!-- (1) --> <item /> </item> <item> <item /> <item /> </item> I can obtain the path of these using a function sc:path(.), which returns something like '/item/item' for the point marked (1). What I want to be able to do is group the item ...

Replacing XML value in XSLT

I can't edit XML, I just want to change XML data in an XSLT file. <xsl:value-of select="Name" disable-output-escaping="yes"/> The value of XML data is "Northfield Bancorp Inc.(MHC)" and I want to replace it with "Northfield Bancorp Inc." (remove "MHC"). Is there any function available in XSLT which can search and replace the this? ...

XSLT Selection of Nodes Based on Substring of Element Name

How can I, with XSLT, select nodes based on a substring of the nodes' element name? For example, consider the XML: <foo_bar>Keep this. <foo_who>Keep this, too. <fu_bar>Don't want this.</fu_bar> </foo_who> </foo_bar> From which I want to output: <foo_bar>Keep this. <foo_who>Keep this, too. </foo_who> </foo_bar> Here I ...

DateDiff for Months in Umbraco

I am trying to get the number of months between two dates in my xslt file like so: <xsl:variable name="now" select="umbraco.library:CurrentDate()"/> <xsl:value-of select="umbraco.library:DateDiff('2010-12-01', $now, 'm')" /> Unfortunately, this seems to give me the number of minutes between the two dates rather than the number of mont...

XSLT expression to check if variable belongs to set of elements

Hello I have code like this: <xsl:if test="$k='7' or $k = '8' or $k = '9'"> Is there any way to put this expression in a form, like, for instance SQL k IN (7, 8, 9) Ty :) ...

sharepoint webpart with caml and xslt

How can i create a sharepoint webpart that accesses a List, and that can have CAML applied to it. The CAML is needed to display return only list items that have the field with "Position" > 0 i also need the webpart to have xslt applied to that. ...

XSLT Insert html content

I'm trying to insert some HTML at a given point. The XML file has a content node, which inside that has actual HTML. For exmaple here is the content section of the XML: ----------------- <content> <h2>Header</h2> <p><a href="...">some link</a></p> <p><a href="...">some link1</a></p> <p><a href="...">some link2</a></p> </...

Selecting nodes with the default namespace

I've got an XML document with many different namespaces in use and a schema to validate against. The schema requires that all elements be "qualified", and I assume this means that they need to have full QNames without a null namespace. However, some elements in this giant XML document have slipped through using just the default namespac...

.Net Transforming large XML docs with XSL

Question: What is the best way to transform a large XML document (>200MB) using XSL in .Net? Background: I have a application that feeds me large data files, I cannot change the format. In the past I have been able to translate smaller data files with no issues. Originally I was working with the XML as strings and was running out of ...

Java, XSLT: How to handle the dynamic namespaces generated by Axis in XSLT

Hi, I have an application that calls a web service (axis based) to get a response in the following format: <?xml version="1.0"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <axis2ns394:ServiceLevelDetailsResponse xmlns:axis2ns394="urn:myco:com:mapping:service:3.0"> <ns1:e...