xslt-2.0

Java XSLT processors supporting XPath 2.0

What are the currently available XSLT processors supporting XPath 2.0 standard? ...

Open-source java XSLT 2.0 implementation?

I'm currently looking into using XSLT 2.0, but I cannot find any open-source java implementations (Saxon-B seems to fit the bill, but isn't schema-aware). Am I missing something? ...

Inline output document selection using result document in XSLT 2.0

Greetings, I'm looking for a method to do in-line result (output) document selecting in XSLT. I know of the method where one creates an xsl:result-document node to have one transformation apply to multiple documents. Usually this method uses several passes, such as: <xsl:template match="/"> <xsl:apply-templates select="*"/> <xs...

Enumerated Values based on distinct ones XSLT 2.0

I have a long list of values in XML with named identifiers. I need to make separate output files for each of the distinct identifiers grouped together and uniquely named. So, for example, let's say I have: <List> <Item group="::this_long_and_complicated_group_name_that_cannot_be_a_filename::"> Hello World! </Item> <Item ...

How to compare the value of two nodes in XSLT

I am new to XSLT. I need help comparing the value of two nodes' values in XML. My sample XML: <?xml version="1.0" encoding="utf-8"?> <G1Export xmlns=""> <AgencyGroup xmlns=""> <Agency xmlns=""> <RecordType xmlns="">RecordType</RecordType> <OrgId xmlns="">123</OrgId> </Agency> </AgencyGroup> <BranchGrou...

xslt 2.0 and Ruby on OS X

I am attempting to parse an XML document against an XSLT 2.0 sheet. However, I am being told that the libraries on OSX 10.5.x only support XSLT 1.0 operations. When I look at xsltproc, I get this: hmasing$ xsltproc --version Using libxml 20616, libxslt 10112 and libexslt 810 xsltproc was compiled against libxml 20616, libxslt 10112 an...

What are some useful constructs for using XSLT to produce XSLT?

I have an existing XSLT stylesheet that takes XML and produces nicely formatted XHTML. I want to make an XSL-FO version of this stylesheet to produce PDF via Apache FOP. What I want to know is this: Are there any convenient to use xslt patterns I need to learn to do things like: copying some nodes unaltered copying most of a node, b...

Transforming one XML format to another via XSL

The existing format is <A> <B> <C>hello</C> <C>how</C> <C>are</C> <C>you</C> </B> </A> I want to transform it to something like this <start> <A> <B> <tag1> hello </tag1> <tag2> hello </tag2> </B> </A> <A> <B> <tag1> are </tag1> <tag2> you </tag2> </B> </A> </start>...

Is there an XSLT 2.0 library for .NET?

Simple query - I am looking for recommendations for a .NET library that supports XSLT 2.0 (if one exists). Thanks. ...

Conditional Auto increment in xsl

I have an XML some thing like <V> <W> <X>1</X> </W> <W> <Y>1</Y> </W> <W> <X>1555</X> </W> <W> <X>1</X> </W> </V> i want to make it something like this <entity ID="start"> <f ID="NewField">0001</f> <f ID="NewField">0001</f> <f ID="NewField">0002</f> <f ID="NewField">0003</f> </enti...

What XSLT 2.0 tools exist?

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

How to count specific nodes in xml hierachy depends on condition in XSL

I'm writing a stylesheet in xsl (version 2.0) I want to know how could I count all nodes with a specific name although they're not siblings for example in the following xml I want to count the numbers of Products from type -Milk but from all shops. I want to know if there's a way to use the count function and not struggling with Recursio...

How to Rename xml elements and use the new names in the same XSL styleSheet?

I have a xsl file for html output. the xsl handles an old format of xml whixh I want to renew now. Therefore I need to rename the old elements names to the new names I'm using the new names in the following xsl code. How can I do this? I tried <xsl:template match="OldName"> <NewName><xsl:value-of select="."/></NewName> </xsl:template> <...

XSLT 2.0 support in JDK 6?

Does JDK 6 support XSLT 2.0 for transformation. My question is, does it come with an XSLT processor built for XSLT 2.0? or DO I need to go for other libraries like Saxon. ...

Is xsl:sequence always non-empty?

I don't understand output from this stylesheet: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; <xsl:template match="/"> <xsl:apply-templates select="root/sub"/> </xsl:template> <xsl:template match="sub"> <xsl:variable name="seq"> <xsl:sequence select="*" /> ...

Optimising XDocument to XDocument XSLT

The following code works but is messy and slow. I am transforming an XDocument to another XDocument using XSLT2 with Saxon, adapted using SaxonWrapper: public static XDocument HSRTransform(XDocument source) { System.Reflection.Assembly thisExe = System.Reflection.Assembly.GetExecutingAssembly(); System.IO.Stream xslfile = thisEx...

xml, html or xhtml in <xsl:output>: Which is the better choice?

For historic reasons we have a mixture of <xsl:output method="xml"> and <xsl:output method="html"> and <xsl:output method="xhtml"> inside an include-hierarchy of XSL files. Now we want to refactor so all XSL files use the same output method. In the end we want to produce XHTML-output so I suppose the latter would be the best c...

XPath format-number with number of decimal places based on a variable?

I have an XML document where the number of decimal places a particular xs:decimal should be reported in is held in a sibling node. I'm currently struggling to find a simple way to output this via the format-number function. I can build a picture string with some other functions, but this seems terribly long-winded for what should be (at...

Will XPath 2.0 and/or XSLT 2.0 be implemented in PHP?

The question was asked but deleted by the asker before it received an answer. Because I believe the question is sound and legitimate and serves a purpose, I'm asking it again and provide the answer I already wrote for the original q. Will XPath 2.0 and/or XSLT 2.0 be implemented in PHP some day or are there any plans? ...

Grouping several groups in XSLT 2

I'm trying to add hierarchy to some grotty extruded typesetting XML. I can't seem to manage grouping several kinds of groups in the same parent element at once. What I have (simplified, obviously): <article> <h1>A section title here</h1> <p>A paragraph.</p> <p>Another paragraph.</p> <bl>Bulleted list item.</bl> <bl>Another bu...