xslt - extract leaf nodes
I want to extract only the leaf nodes from an XML document (i.e., only elements that have no children). Has anyone written an xslt to do this? ...
I want to extract only the leaf nodes from an XML document (i.e., only elements that have no children). Has anyone written an xslt to do this? ...
Have a source xml document that uses namespace containing prefixes and a default namespace. When I transform it using a XSLT doc, the resulting translated xml document is incorrect, that is, element data from the source xml document is missing. When I remove the "default namespace" from the source xml document, the transformation works...
I have a block of XSLT that may be applied several times throughout a transform. But I want to it actually run only the first time it is applied, it shoul be skipped all subsiquent times. How do I do this? As an example, this is the sort of thing I want to do: In the stylesheet I define a global variable: <xsl:variable name="run_once...
I have an XML document with a default namespace indicated at the root. Something like this: <MyRoot xmlns="http://www.mysite.com"> <MyChild1> <MyData>1234</MyData> </MyChild1> </MyRoot> The XSLT to parse the XML does not work as expected because of the default namespace, i.e. when I remove the namespace, everything w...
Can I send a node to an XSLT function? For example: <books> <book> <author>a1</author> <price>10</price> <year>2009</year> </book> <!-- ... --> </books> Can I send the <book> element to a function - within that function I want to process the nodes under book (<author>, <price> or <year>) Can I create a xsl:function ...
Hello i am working on xsl-fo to generate a pdf from xml directly, i am using RenderX for this. in that i am not able to get the header & footer for blank pages? I have inserted the templates for header and footer (for blank pages separately) also, but still i am not able to get it, is there any thing else i need to do? Please advice. ...
Hello, The best way to explain my problem is to give an example xml: <block> <if> <trans> <trans1> <text1>text</text1> </trans1> <trans1> <text1>text</text1> </trans1> </trans> <if> <trans> ....... </trans> </if> </if> </block> So to capture all the data ...
Currently I have some legacy ASP.NET 2.0 code that uses the ASP Xml web control like this: <asp:Xml ID="XmlResult" runat="server" /> This is used to perform an XSLT transformation in c# code-behind like this: XslTransform xslt = new XslTransform(); xslt.Load(Server.MapPath("~/xslt/MyXsltFile.xslt")); XmlResult.Transform = xslt; XmlRe...
Using Umbraco, which is quicker to load on a page... XSLT Macro or a .NET user Control (via an Umbraco Macro). ...
I'v done a tree view in xsl using a javascript function I want to change the icons depending on the status (+ for to open , - for to close) ...
I have a scenario to validate date from incoming xml file, which has effectiveTime as a element, the format of that element can be one of them as below 1) <effectiveTime value="YYYYMMDD"/> or 2) <effectiveTime> <low value="YYYYMMDD"/> <high value="YYYYMMDD"/> </effectiveTime> if the incoming file has the format specified ...
I need to generate a Sequence id for TOC part and idref for the referenced places using the content first three letters. Input: <tocentry><title>List of Boxed Readings</title></tocentry> <tocentry><title>Foreword</title></tocentry> <tocentry><title>About the Author</title></tocentry> <tocentry><title>Preface</title></tocentry> <tocentr...
I'm putting asp server-controls into my SharePoint XSLT using SharePoint Designer. I've found it's really handy for pre-populating values into the form, or providing a different experience than the SharePoint defined layout (hidden fields, etc). For example, I can use a asp:TextBox control instead of the SharePoint:FormField control if...
I'm customizing a custom list form in xslt using SharePoint designer. In my list, I have a textbox that represents a numerical value. I would like to present this textbox to the user as a dropdown list with pre-defined values (1-7). Unfortunately, I can't use a SPFieldChoice because it is evaluated as a string in my SharePoint Designe...
I have an RSS of an events feed. I would like to hide previous events. Assuming XML data subset of <Navigation Name="ItemList" Type="Children"> <Page ID="x32444" URL="..." Title="Class..." EventStartDate="20090831T23:00:00" EventEndDate="20090904T23:00:00" EventStartTime="20090830T15:30:00" EventEndTime="20090830T18:30:00" Changed=...
I'd just like to know, is it possible to output the processing of a single input XML file to multiple other files using Xalan? I don't necessarily HAVE to do it that way, I know I can use other tools to do it (like Saxon), and/or I could process different files to obtain different outputs. I'd just like to know the options I have to do ...
Hey, I was wondering if anybody knew how to alter the following XSL stylesheet so that ANY text in my transformed XML will retain the carriage returns and line feeds (which will be \r\n as I feed it to the XML). I know I'm supposed to be using in some way but I can't seem to figure out how to get it working <xsl:stylesheet xmlns:xsl=\...
Hello all, I'm trying to wrap my head around XML and XSLT stuff, and in my research I stumbled upon different XSLT processors. Xalan was the first one, and it seems to work pretty fine and is free, except that I need/want to use features in the 2.0 specs, including XML Schema. To do so I must either work with extensions and Xalan, or sw...
I'm processing an XML document (an InstallAnywhere .iap_xml installer) before handing it off to another tool (InstallAnywhere itself) to update some values. However, it appears that the XSLT transform I am using is stripping CDATA sections (which appear to be significant to InstallAnywhere) from the document. I'm using Ant 1.7.0, JDK 1...
Lets say I have a xslt stylesheet like the following: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common" exclude-result-prefixes="exslt" version="1.0"> <xsl:output method="html" encoding="utf-8" indent="no" /> <xsl:variable name="foo"...