Click here to Skip to main content
15,910,009 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: How to use msxml4.dll in project? Pin
Andrew Quinn AUS25-May-04 5:46
Andrew Quinn AUS25-May-04 5:46 
GeneralXSL Table view Pin
mauricexy3-May-04 4:21
mauricexy3-May-04 4:21 
GeneralRe: XSL Table view Pin
mauricexy4-May-04 3:52
mauricexy4-May-04 3:52 
Generalproblem with xslt! Pin
hassan azizi30-Apr-04 3:37
hassan azizi30-Apr-04 3:37 
Generalproblem with xslt! Pin
hassan azizi30-Apr-04 3:26
hassan azizi30-Apr-04 3:26 
GeneralNewbie XML/XSL question Pin
Anonymous29-Apr-04 16:15
Anonymous29-Apr-04 16:15 
GeneralRe: Newbie XML/XSL question Pin
Member 64272914-May-04 2:46
Member 64272914-May-04 2:46 
GeneralStoring XSLT files in SQL Server Pin
Member 116304929-Apr-04 12:29
Member 116304929-Apr-04 12:29 
I'm building an application, using C# and SQL 2000, where based on the user identity I wish to present different views of data and XSLT is an ideal solution for this application. If when I call the Load method of XslTransform I reference an on-disk file everything works as expected.

XslTransform transform = new XslTransform ();
transform.Load (@"D:\WorkDir\test.xslt");

However, I want to store different XSLT's in the database and retrieve it based upon the user's identity. (Interesting enough I could find no sample code anywhere that did this, although I would think it would be fairly common).

When I try to read back the XSLT from SQL - if I do not put in a FOR XML I cannot load the result into an XmlReader class. I get an exception of:
"Invalid command sent to ExecuteXmlReader. The command must return an Xml result."

Putting in a FOR XML AUTO or RAW allows it to load the reader, but the transform.Load subsequently fails with:

"Missing mandatory attribute 'version'."

although there is a version tag in my XSLT.

sqlConn.Open ();
SqlCommand sqlCommandXSL = new SqlCommand ("sp_GetUserTransform 0", sqlConn);

XmlTextReader xmlReadTransform = (XmlTextReader) sqlCommandXSL.ExecuteXmlReader ();
XPathDocument doc = new XPathDocument(xmlReadTransform, XmlSpace.Preserve);

XPathNavigator xpn = doc.CreateNavigator ();
XslTransform xslTransform = new XslTransform ();
xslTransform.Load (xpn, null, null); <-- throws exception here.

I'd appreciate any insights as to what I'm doing incorrectly and links to samples that show how to do this.

Thanks.
GeneralParsing XML with VBScript Pin
lnong29-Apr-04 12:04
lnong29-Apr-04 12:04 
Generalsend xml Pin
hmdhmd27-Apr-04 0:58
hmdhmd27-Apr-04 0:58 
GeneralRe: send xml Pin
Ryan Roberts27-Apr-04 3:03
Ryan Roberts27-Apr-04 3:03 
GeneralRe: send xml Pin
Anonymous28-Apr-04 23:55
Anonymous28-Apr-04 23:55 
GeneralIXMLDOM Pin
Stojan7823-Apr-04 1:21
Stojan7823-Apr-04 1:21 
Generalxml digital signature Pin
nuez21-Apr-04 4:56
nuez21-Apr-04 4:56 
GeneralRe: xml digital signature Pin
ian mariano25-Apr-04 14:40
ian mariano25-Apr-04 14:40 
QuestionAvailable DTD for MS Project? Pin
anderslundsgard19-Apr-04 20:30
anderslundsgard19-Apr-04 20:30 
QuestionHow to include different XSLT files on the fly based on some criteria? Pin
Mohit19-Apr-04 12:09
Mohit19-Apr-04 12:09 
QuestionCan Fill Pin
wokankan19-Apr-04 1:17
wokankan19-Apr-04 1:17 
GeneralAn xml browser-based electronic medical record Pin
ejam17-Apr-04 19:21
ejam17-Apr-04 19:21 
GeneralRe: An xml browser-based electronic medical record Pin
Member 52486620-Apr-04 5:45
Member 52486620-Apr-04 5:45 
GeneralInner XML Pin
jithen_dt16-Apr-04 3:15
jithen_dt16-Apr-04 3:15 
GeneralRe: Inner XML Pin
Mike Ellison18-Apr-04 19:54
Mike Ellison18-Apr-04 19:54 
GeneralXML/XSLT/XML Schema questions Pin
rt280016-Apr-04 2:57
professionalrt280016-Apr-04 2:57 
GeneralXSLT over unknown XML(DTD) (XML to SQL INSERT(s)) Pin
Stoian Ivanov13-Apr-04 23:06
Stoian Ivanov13-Apr-04 23:06 
Generalxml file capacity Pin
karanba12-Apr-04 8:59
karanba12-Apr-04 8:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.