xsltprocessor

Doing an XSL transform of a branch of a Docbook element tree

I'd like to use the docbook XSL stylesheets to render various parts of a document, without transforming the entire thing. The complication is that some of these parts have <footnoteref> elements whose linkend attributes are not located within the same chunk. In other words, I want to process a branch of the tree which includes the <foo...

passing parameters in xml

i'm trying to implement paging in xml using this code and got around to making it work. while it works perfectly, there is a small issue, that when i click on the NEXT button, it keeps reloading the page with the same initial records. it does not take the user to the next page. i came across this link wherein the poster had a similar ...

css in xsl document

how do i implement css in xsl file? i tried this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; <link rel="stylesheet" type="text/css" href="dxsl.css"/> <xsl:output method="html" /> but it threw the error: XSLTProcessor::importStylesheet(): Found a top-level...

accessing xml attributes in xsl

i've this xml code: <title xml:lang="ar">أربيك</title> <title xml:lang="en">English</title> which i'm formatting in xsl: <div class="title"> <xsl:value-of select="root/title"/> </div> however, this^ only displays the arabic title, and not the english one. i tried this code: <div class="title"> <xsl:attribute name="...

Boolean expressions in XSLT select statements

I have the following XSLT code that almost does what I want: <xsl:variable name="scoredItems" select= ".//item/attributes/scored[@value='true'] | self::section[attributes/variable_name/@value='SCORE']/item | .//item//variables//variable_name"/> I want to change this t...

.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...

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 can I add a part to xml using xslt and xsltproc?

I have an xml file : <?xml version="1.0" encoding="iso-8859-1"?> <Configuration> <Parameter2> </Parameter2> </Configuration> and I'd like to add following part to my xml file between <Configuration> and <Parameter2> parts. <Parameter1> <send>0</send> <interval>0</interval> <speed>200</speed> </Parameter1> ...

how to add a param to xslt with xslt-ruby?

the title states it, essentially what is wrong here? I keep getting nothingness the param isnt getting passed... <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="stylesheet"/> <xsl:template match="/"> <xsl:copy-of select="$stylesheet"/> </...

Pass href dynamically in an XML file

How can I dynamically specify the href value in the line <?xml-stylesheet type="text/xsl" href="first.xsl"?> in an xml? I would like to substitute "first.xsl" dynamically. Thanks for your help. ================== Apologies for messing this up/making it difficult for you to help ==== My XML is: <?xml version="1.0" encoding="utf-8"...

Need help preforming an XSL Transform from XML to HTML in ASP.NET MVC

I just learned about XSL and XSLT a few days ago and now I'm trying to put it to work based on a question I had earlier today (want to have formated XML displayed on my website). Here is the code I'm trying (in a View): XDocument xmlInput = XDocument.Parse(item.Action); XDocument htmlOutput = new XDocument(); using (System.Xml.XmlWrit...

How do I use Elastic MapReduce to run an XSLT transformation on millions of small S3 xml files?

More specifically, is there a somewhat easy streaming solution? ...

How to link up XML file with XSLT file?

The examples at http://en.wikipedia.org/wiki/XSLT or http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&amp;xsltfile=cdcatalog seem to be independent XML and XSLT files. Don't they have to be linked? Or do you somehow put them into a same file? Otherwise, how does one file know how to suck in data from the other file? ...

Can PHP communicate with XSLT?

I want to use a combination of xml & xslt as a templating system. The question that I want answered is: can xslt and PHP communicate with each other (i.e share variables)? ...

Which browser can show XML data transformed by XSLT?

say, if there is a file that's call data.xml, and a file that is format.xsl (or is it format.xml ?), which is to transform the XML data and format it as well using CSS, then which browser can display it? Which file should be opened? (the .xsl or the .xml?) Actually I saw in another example that the XSLT file's first line is to href="f...

What I got data files as data.xml, how to add the stylesheet link to those data files?

It looks like if the data files fetched from data source already contain <?xml version="1.0" encoding="ISO-8859-1"?> <catalog> <cd> <title>Empire Burlesque</title> ... then the correct way to make the data displayable on a browser is to create a .xsl file, and then make the .xml file contain one more line (the second line below): ...

Is using XML and XSLT a good way to make a webpage?

I just learn of ways to use XML data file and XSLT to create a webpage (transform from XML to HTML or XHTML). But I have never seen a webpage that has the source code of XML with a link to an XSLT file. Is it not a good solution? ...

xslt Parsing in .NET

Hi all, Consider following snippet code for xml. <rootnode> <child id="child1" ><![CDATA[child 1]]></child> <child id="child2" ><![CDATA[child 2]]></child> <child id="child3" ><![CDATA[child 3]]></child> <child id="child4" ><![CDATA[child 4]]></child> <child id="child5" ><![CDATA[child 5]]></child> <child id="chi...

Efficient XSLT pipeline, with params, in Java

Hi, The top answer to this question describes a technique to implement an efficient XSLT pipeline in Java: http://stackoverflow.com/questions/1312406/efficient-xslt-pipeline-in-java-or-redirecting-results-to-sources Unfortunately, while Transformer seems to expose an API for setting XSLT parameters, this does not seem to have any eff...