xslt

Webtextedit Mousemove event in XSLT

Hi, I need help please. No clue in xml & WebtextEdit, I am editing an xslt stylesheet that creates asp controls. Below is the WebTextEdit control, I want to add an mousemove event: <xsl:element name="igtxt:WebTextEdit"> <xsl:attribute name='id'><xsl:value-of select='$Name' /></xsl:attribute> <xsl:attribute name='r...

How do I check if a tag exists in XSLT?

I have the following template <h2>one</h2> <xsl:apply-templates select="one"/> <h2>two</h2> <xsl:apply-templates select="two"/> <h2>three</h2> <xsl:apply-templates select="three"/> I would like to only display the headers (one,two,three) if there is at least one member of the corresponding template. How do I check for this? ...

Button generated for each item in an XSLT file runat server

I am tryiing to create an "add to cart" button for each item that is displayed by an XSLT file. The button must be run at server (VB) and I need to pass parameters into the onlick, so that the requested item is added to the cart. Is this possible, and if so, how should I go about it? When I try <asp:Button id="Button123" Text="Add t...

ASP.NET, XSLT and dynamic controls

I wish to use xml and xsl to generate controls on an asp.net page. I currently have a asp.net content page that contains a xml control. When the page is loaded, an xml file is loaded and the required element is extracted and set as the xml control's DocumentContent and the xml control's TransformSource is set to the appropriate xsl file...

SSI and XSL

I am building a menu and have it set up so that I use a stadard <!--#include virtual = "myDoc.xml" --> SSI tag to include my xml document. The xml document includes the xsl document with <?xml-stylesheet type="text/xsl" href="myOtherDoc.xsl"?>. For some reason the xsl document is not working. The xml is being displayed as a blob. Th...

Absolute Positioning using XSL to be transformed and rendered to PDF

How does one accomplish absolute positioning using XSL? I am working on a XSL transformation to FO to PDF for mailing letters and am trying to figure out how to absolutely position the fo:blocks containing the Return Address and Recipient Address so that they are displayed in the windows on the envelope. Anyone have suggestions on th...

Using server-side XML Parser to generate HTML content.

Is it possible using a server side xml parser to have it create a html blob that it is then included in a existing html page? Thanks ...

Why do my XSL transformed links come out relative to the base?

<a> <xsl:attribute name="href"> <xsl:value-of select="link" /> </xsl:attribute> <xsl:attribute name="target">new</xsl:attribute> <xsl:value-of select="title" /> </a> Thats my template, and in my code: sb.Append("<title>"); sb.AppendFormat("{0} - {1}", f.UserName, f.PointTypeDesc); sb.Append("</title>"); sb.Append("<link>"); ...

XSL Passing a path to a template

Is it possible to pass a path such as subject/name to a template then to use that path which is passed in the template as a path and not as a textual string. I am finding that the path is treated as text rather than a path. ...

Special Characters in XML

I am creating a left navigation system utilizing xml and xsl. Everything was been going great until I tried to use a special character in my xml document. I am using and I get th error. reason: Reference to undefined entity 'raquo'. error code: -1072898046 How do I make this work? Thanks ...

Best XSLT Editor &| Debugger

Other than Visual Studio, what tool have you found best to create, edit, maintain, and possibly debug your XSLT files? I work on a fairly big project and we have tons of XSLT files and they have grown quite complex in their implementation. The language seems so brittle. It would be nice to navigate and identify errors more quickly. ...

"Token Text in state EndRootElement would result in an invalid XML document"

I'm seeing this exception message coming from XslCompiledTransform.Transform(), but after handling the exception the XSL transform still appears to have been successful. The full exception message is: Token Text in state EndRootElement would result in an invalid XML document. Make sure that the ConformanceLevel setting is set t...

Ordering values in xslt

I'm trying to order items based on an attribute value: <xsl:apply-templates select="Question"> <xsl:sort order="ascending" select="@Value"></xsl:sort> </xsl:apply-templates> This does order them, but I could have values like 1,2,3, ... 10, 11, ... 20 and it will order them 1,10,11, ... 2,20... 3. etc. I could also have values like...

How do you create a PDF from XML in Java?

At the moment, I'm creating an XML file in Java and displaying it in a JSP page by transforming it with XSL/XSLT. Now I need to take that XML file and display the same information in a PDF. Is there a way I can do this by using some kind of XSL file? I've seen the iText Java-PDF library, but I can't find any way to use it with XML and a...

Concatenating xml files with xslt

I have several xml files, the names of which are stored in another xml file. I want to use xsl to produce a summary of the combination of the xml files. I remember there was a way to do this with the msxml extensions (I'm using msxml). I know I can get the content of each file using select="document(filename)" but I'm not sure how to ...

Tools for debugging xslt

I have a Java servlet which generates xml, translates it with an xslt stylesheet, and then displays the resulting HTML. This is the first time I've worked with xslt. What's a good way to debug xslt? I have (or can get) some sample XML files to apply the transform too. But I'm not really even sure of the syntax so something that would giv...

What xml/xslt library(ies) currently work well for java?

I need to apply some xml templates to various streams of xml data (and files, on occasion) and there seem to be a large number of xml libraries for java out there -- enough that it's difficult to quickly determine which libraries are still active, how they differ from the other options that are also active, and what criteria should be co...

Firefox 3 doesn't apply my xslt stylesheet, but other browsers do.

I'm trying to serve dynamically generated xml pages from a web server, and provide a custom, static, xslt from the same web server, that will offload the processing into the client web browser. Until recently, I had this working fine in Firefox 2, 3, IE5, 6 and Chrome. Recently, though, something has changed, and Firefox 3 now displays ...

Nested predicates in xslt

Is it possible to do the equivalent of the following in xslt: .//TagA[./TagB/[@AttrA='AttrAValue'] = 'TagBValue'] This is failing within Visual Studio 2008 with the following error: error: Unexpected token '[' in the expression. .//TagA[./TagB/ -->[<-- @AttrA='AttrAValue'] = 'TagBValue'] Should this be working? Is this a problem in...

How do you add a page break in a PDF with XSL-FO?

How do you add a page break into a document with XSL-FO? I'm using Apache FOP to create PDFs, if that makes a difference. ...