Hello, i have a semi-weird xml file to parse with xsl. The xml has an extra tag which defines what the data is below , how do i go about disregarding anything with ColName in my xsl ? XML <?xml version="1.0" encoding="ISO-8859-1"?> <Report> <ColName> DateTime </ColName> <ColName> PointName </ColName> <ColName> PointValue </ColName> <Record> <Date> data </Date> <Name> data </Name> <Value> data </Value> </Record> <Report> <ColName> DateTime </ColName> <ColName> PointName </ColName> <ColName> PointValue </ColName> <Record> <Date> data </Date> <Name> data </Name> <Value> data </Value> </Record> <Record> <Date> data </Date> <Name> data </Name> <Value> data </Value> </Record> </Report> ``**XSL** `<?xml version="1.0"?> <xsl:stylesheet version = "1.0" xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:strip-space elements = "Report"/> <xsl:template match="Record"> <text>
</text> <xsl:text/><xsl:value-of select="normalize-space(Record)"/><xsl:text/> <xsl:value-of select="normalize-space(DateTime)"/>,<xsl:text/> <xsl:value-of select="normalize-space(PointName)"/>,<xsl:text/> <xsl:value-of select="normalize-space(PointValue)"/>,<xsl:text/> <text>
</text> <xsl:text disable-output-escaping = "yes" > </xsl:text> </xsl:template> </xsl:stylesheet>` Thanks Matt``
matty2desmara
Posts
-
How to ignore tags ? -
Unable to load DLL - Why ??I tried setting my DllImport to [DllImport(@"C:\Windows\System32\DSVR.dll", EntryPoint = "DSVR_Open")] , thinking that may work, but on the client end i get : System.DllNotFoundException: Unable to load DLL 'C:\Windows\System32\DSVR.dll': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1) at DSVR_CSharpExample.DSVR.DSVR_Open() at DSVR_CSharpExample.Form1.Form1_Load(Object sender, EventArgs e) in D:\Program Files\Integral\VideoSDK\samples\DSVR Export\Form1.cs:line 127
-
Unable to load DLL - Why ??Hi Jay, The machines have the dlls that's what i don't get (Dependency walker maps out correctly). As a test i installed VS2008 on the machine, and the app ran. What am i missing here ? In my import [DllImport("DSVR.dll", EntryPoint = "DSVR_Open")] is it possible to import from a static location ex. [DllImport("C:\Windows\Systems32\DSVR.dll", EntryPoint = "DSVR_Open")] ?? Thanks -md
-
Unable to load DLL - Why ??Hi Luc, thanks for the response. All the DLL's are present (according to dependency walker). I've updated the PATh environment variable and the same issue is happening. As a test i installed VS 2008 on the client PC and the app runs (If finds all the dlls), i have a strong feeling it's some sort of pathing issue, does that seem right? (I can't leave VS on the client machine). -md
-
Unable to load DLL - Why ??Hi, I created a simple C# program that imports a dll (Unmanaged dll), which a coworker wrote, the dll references other managed dll's (kernel32.dll,...etc) . On the PC i built the app on everything works great ( /bin/Debug/test.exe Folder), as well the unmanaged dll resides in the same folder as the .exe. I published the app and ran it on another PC and i receive an error " Unable to load DLL "DSVR.dll" ..." Details ************** Exception Text ************** System.DllNotFoundException: Unable to load DLL 'DSVR.dll': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1) at DSVR_CSharpExample.DSVR.DSVR_Open() at DSVR_CSharpExample.Form1.Form1_Load(Object sender, EventArgs e) in C:\Program Files\H&E\DSVR_CSharpExample\Form1.cs:line 127 at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) I installed the same version of .net, Redistribution 2008 SP1, Powerpacks, etc.. i ran dependency walker and everything traced out fine. Any Suggestion on What am i doing wrong (I've been trying to figure this out for 2 days) ?
Namespace DSVR_CSharpExample
{/// /// Static class containing all of the exported methods from the DSVR library /// public static class DSVR { \[DllImport("DSVR.dll", EntryPoint = "DSVR\_Open")\] public static extern IntPtr DSVR\_Open(); \[DllImport("DSVR.dll", EntryPoint = "DSVR\_Close")\] public static extern void DSVR\_Close(IntPtr ConnectionHandle);
.
.
.
.Much appreciated, Matt
-
C# - bmp to jpgAnyone know of a simple way to convert bmp to jpg without any expensive conversion library (www.catenary.com ..etc) ?? Thanks Matt
-
C# for non C# programmerHi Marc, I forgot to include that in my code, but i was trying to use Thread.Sleep(time) with no success. I'm not sure where to put it. I think my main issue is getting exportImage() to be called more than once, since it's in the foreach loop i though it would be called on every scan, do you know why it's not ? the only way i can initiate a call again is to press button1. Thanks for your help Matt
-
C# for non C# programmerHi, I'm not fluent with C# (but i some how got forced into doing this). After form1 loads the user supplies information (Ip address, username ...etc), presses button 1, this connects them to a specialized video recorder. I then call the ExportImage() method to save the current frame to a bmp in a specified location. What i would like to do is automatically go to ExportImage() every 5 seconds. The only way i can get it to call ExportImage() again is to press the button. Any suggestions? Thanks Matt
static void Main()
{
Application.Run(new Form1());} private void button1\_Click(object sender, System.EventArgs e) { IDVRSystem system = SystemFactory.FindOrCreateSystem(cmbSystem.Text, 18772, txtUserID.Text, txtPassword.Text); system.Open(); if (system.ConnectionStatus == Integral.Client.Sources.ConnectionState.LoggedIn) { mRecorder = system.Recorders.FindByIPAddress(txtRecorder.Text); if (mRecorder != null) { // Sometimes a camera is not renderable because it is not 'detected.' // we'll just keep rendering until we get a successful render. foreach (IStream stream in mRecorder.Cameras) { mInfo = stream.Render(picVideo); if (mInfo != null) break; } //Console.WriteLine("button method"); //ExportImage(); } } } private void ExportImage() { Console.WriteLine("Export Image Method"); Bitmap bmp; double aspectRatio; System.Threading.Thread.Sleep(500); mInfo.VideoOverlay.GetCurrentImage(false, out bmp, out aspectRatio); Image img = bmp.GetThumbnailImage(800, 600, null, IntPtr.Zero); img.Save(@"C:\\Test.bmp"); img.Dispose(); bmp.Dispose(); }