msxsl

Issue using assemblies and namespaces in msxsl

与世无争的帅哥 提交于 2020-01-03 12:34:03
问题 I have an XSL transform that is using msxsl to add extension methods in C#. I have the following setup for msxsl: <msxsl:script language="C#" implements-prefix="cs"> <msxsl:assembly name="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <msxsl:assembly name="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <msxsl:using namespace="System.Collections.Generic" /> <msxsl:using namespace="System.Linq" /> <msxsl:using namespace

Issue using assemblies and namespaces in msxsl

萝らか妹 提交于 2020-01-03 12:33:07
问题 I have an XSL transform that is using msxsl to add extension methods in C#. I have the following setup for msxsl: <msxsl:script language="C#" implements-prefix="cs"> <msxsl:assembly name="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <msxsl:assembly name="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <msxsl:using namespace="System.Collections.Generic" /> <msxsl:using namespace="System.Linq" /> <msxsl:using namespace

How to save XML to a file

橙三吉。 提交于 2020-01-01 12:16:23
问题 How do you save translated XML to an actual file on disk? I am new to XML/XSLT and I am trying to figure that out. I can't seem to find any examples that work for me. For example, I just want to save the file to c:\temp\text.xls. How to I save it? Do I have to use java or .net or some other programming language/api? I was hoping to have the XSL just save the file. 回答1: The XSL can't do anything by itself. It's just a definition for transforming an XML file into something else. To do anything

How to only convert an XML file's attribute using XSLT, and leave the other content?

六眼飞鱼酱① 提交于 2019-12-25 03:16:48
问题 I have a xml file as below, and now I want to use the XSLT to transformer it, keep all the elements and attributes, but if it happen to the attributes with the value started with "SQL:", then execute the sql and replace the attribute value with the resolved SQL(it involve the http://msdn.microsoft.com/en-us/library/533texsx(VS.90).aspx. now I encoutered the issue:how to check if the current node type is attribute, and how to replace the attribute value, I base on the visual studio default

successor of msxsl.exe?

流过昼夜 提交于 2019-12-22 04:17:12
问题 We intend to migrate our framework from msxml4 to msxml6. We where using msxsl.exe as yet. It seems to support only MSXML versions up to 4.0, as command line msxsl.exe -u version 6.0 tells me. Is there a successor of msxsl.exe? Any alternative command line processor? 回答1: There are a number of ways you could replace the existing processor, it just depends on what level of functionality you require and whether you need MSXML specific functionality. For example there is xsltproc which is part

XSLT: Reading content that is devided by empty tags

你离开我真会死。 提交于 2019-12-22 00:11:10
问题 So I am busy creating a XSLT file to process various XML documents into a new node layout. There's one thing I can't figure out, here is an example of XML that I'm working with: <page> This is a paragraph on the page. <newParagraph/> This is another paragraph. <newParagraph/> Here is yet another paragraph on this page. <page> As you can see the paragraphs are split up using empty tags as deviders. In the result XML I want this: <page> <p> This is a paragraph on the page. </p> <p> This is

Constructing, not selecting, XSL node set variable

帅比萌擦擦* 提交于 2019-12-13 04:32:30
问题 I wish to construct an XSL node set variable using a contained for-each loop. It is important that the constructed node set is the original (a selected) node set, not a copy. Here is a much simplified version of my problem (which could of course be solved with a select, but that's not the point of the question). I've used the <name> node to test that the constructed node set variable is in fact in the original tree and not a copy. XSL version 1.0, processor is msxsl. Non-working XSL: <?xml

Inline c# in XSLT results in weird behavior

点点圈 提交于 2019-12-11 15:43:47
问题 I generated an xsl stylesheet with some inline c# code. I need to use it in an asmx application running on IIS. This is an excerpt of the stylesheet: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl in lang user" xmlns:in="http://www.composite.net/ns/transformation/input/1.0" xmlns:lang="http://www.composite.net/ns/localization/1.0" xmlns:f="http://www.composite.net/ns/function/1.0" xmlns="http:/

how to pass a parameter and use that in my xslt

混江龙づ霸主 提交于 2019-12-10 03:34:29
问题 i have a xml file and a related xslt file. I am using msxsl.exe and i need to pass a parameter as a command line argument and use that in my xslt file. how can i do that??? command: msxsl.exe country.xml sheet.xslt -o country_sheet.html p1="india" how to retrieve the value india in my xslt file? 回答1: try this <xsl:param name="p1" select="p1"/> this would be outside any templates, acting somewhat like a global variable yes then to use the contents of this you could use this inside a template

XSLT: Reading content that is devided by empty tags

我是研究僧i 提交于 2019-12-04 19:36:38
So I am busy creating a XSLT file to process various XML documents into a new node layout. There's one thing I can't figure out, here is an example of XML that I'm working with: <page> This is a paragraph on the page. <newParagraph/> This is another paragraph. <newParagraph/> Here is yet another paragraph on this page. <page> As you can see the paragraphs are split up using empty tags as deviders. In the result XML I want this: <page> <p> This is a paragraph on the page. </p> <p> This is another paragraph. </p> <p> Here is yet another paragraph on this page. </p> <page> How can I achieve this