|
Hi,
Thanks alot for your help I have been away a while but It I have tried your suggestion below and it extracts the mean value.
/item/item[item/value[@codValue='R-00317']]/value
I still have a small problem though. With your suggestion I also extract the other measurements mean value (see example below) I have tried to “tune” my search using your example, but I don’t get the hang of it, I need to somehow check two different attributes both <value codevalue="R-00317"> and <concept codevalue="”Bi" diamater”=""> instead of just one as before. Is it possible to do that in one expression?
Example code..
<item valtype="CONTAINER">
<concept codvalue="125005"> MeasureGroup
<item valtype="NUM" reltype="CONTAINS">
<concept codvalue="11820-8">Bi Diameter
<value>4.9
<item valtype="NUM">
<concept codvalue="11820-8">Bi Diameter
<value>5.1
<item valtype="NUM">
<concept codvalue="11820-8">Bi Diameter
<item valtype="CODE">
<value codvalue="R-00317">Mean
<value>5.0
<item valtype="CONTAINER">
<concept codvalue="125005"> MeasureGroup
<item valtype="NUM" reltype="CONTAINS">
<concept codvalue="11820-7">ADH length
<value>2.2
<item valtype="NUM">
<concept codvalue="11820-7"> ADH length
<value>2.4
<item valtype="NUM">
<concept codvalue="11820-7"> ADH length
<item valtype="CODE">
<value codvalue="R-00317">Mean
<value>2.3
|
|
|
|
|
oopps.
I forgot to ignore html..Example code..
<item valType="CONTAINER">
<concept codValue="125005"> MeasureGroup</concept>
<item valType="NUM" relType="CONTAINS">
<concept codValue="11820-8">Bi Diameter</concept>
<value>4.9</value>
</item>
<item valType="NUM">
<concept codValue="11820-8">Bi Diameter</concept>
<value>5.1</value>
</item>
<item valType="NUM">
<concept codValue="11820-8">Bi Diameter</concept>
<item valType="CODE">
<value codValue="R-00317">Mean</value>
</item>
<value>5.0</value>
</item>
</item>
<item valType="CONTAINER">
<concept codValue="125005"> MeasureGroup</concept>
<item valType="NUM" relType="CONTAINS">
<concept codValue="11820-7">ADH length</concept>
<value>2.2</value>
</item>
<item valType="NUM">
<concept codValue="11820-7"> ADH length </concept>
<value>2.4</value>
</item>
<item valType="NUM">
<concept codValue="11820-7"> ADH length </concept>
<item valType="CODE">
<value codValue="R-00317">Mean</value>
</item>
<value>2.3</value>
</item>
</item>
|
|
|
|
|
Which attribute did you want to add to the query?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
I would like to add the codValue attribut from the concept node.
<concept codValue="11820-8">Bi Diameter</concept>
|
|
|
|
|
/item/item[concept[@codValue='11820-8'] and item/value[@codValue='R-00317']]/value
The concept element, the third level item element(with the value child element) and second level value element (target of the query) are all siblings and children of the second level item element.
George
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi
it was the and operator that I was looking for, didn't knew that you could combine multiple conditions.
Thanks for your help!
|
|
|
|
|
It is users.sql :
use NHibernate
go
CREATE TABLE users (
LogonID nvarchar(20) NOT NULL default '0',
Name nvarchar(40) default NULL,
Password nvarchar(20) default NULL,
EmailAddress nvarchar(40) default NULL,
LastLogon datetime default NULL,
PRIMARY KEY (LogonID)
)
go
It is users.cs :
using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Cfg;
namespace NHibernate.Examples.QuickStart
{
public class User
{
private string id;
private string userName;
private string password;
private string emailAddress;
private DateTime lastLogon;
public User()
{
}
public string Id
{
get { return id; }
set { id = value; }
}
public string UserName
{
get { return userName; }
set { userName = value; }
}
public string Password
{
get { return password; }
set { password = value; }
}
public string EmailAddress
{
get { return emailAddress; }
set { emailAddress = value; }
}
public DateTime LastLogon
{
get { return lastLogon; }
set { lastLogon = value; }
}
}
//interface ISession
//{
// void save(users newUser);
// void Save(users newUser);
//}
}
It is User.hbm.xml :
using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Cfg;
namespace NHibernate.Examples.QuickStart
{
public class User
{
private string id;
private string userName;
private string password;
private string emailAddress;
private DateTime lastLogon;
public User()
{
}
public string Id
{
get { return id; }
set { id = value; }
}
public string UserName
{
get { return userName; }
set { userName = value; }
}
public string Password
{
get { return password; }
set { password = value; }
}
public string EmailAddress
{
get { return emailAddress; }
set { emailAddress = value; }
}
public DateTime LastLogon
{
get { return lastLogon; }
set { lastLogon = value; }
}
}
//interface ISession
//{
// void save(users newUser);
// void Save(users newUser);
//}
}
It is App.config :
<configuration>
<configsections>
<nhibernate>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider">
<add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2005Dialect">
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver">
<add key="hibernate.connection.connection_string" value="Data Source=dev2;Initial Catalog=NHibernate;User ID=sa;Password=buyagift;">
It is Programs.cs :
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace NHibernate
{
static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// Application.Run(new NHibernate.Form1());
Application.Run(new NHibernate.Examples.QuickStart.Form1());
}
}
}
This code generates following error:
Unknown entity class: NHibernate.Examples.QuickStart.User
Can anyone help me please?
Thanks
shoaib
|
|
|
|
|
Hello.
I want to build a sample source in Windows 2003 Server Sp1 DDK with XML component.
- sample source : WINDDK\3790.1830\src\print\oemdll\oemui
I installed msxml 4.0 sp1 SDK and
added the following lines to precomp.h in the sample source.
#import "msxml4.dll"
#include <msxml2.h>
using namespace MSXML2;
And then, Opened the build windows to build it.The result is OK.
But, I declared the XML variable like following and builded the source.
IXMLDOMDocument2Ptr pXMLDoc = NULL;
The result was failed like following.
The build of each file was right, but finally the linking was failed.
1>oemui.obj : error LNK2019: unresolved external symbol "void __stdcall _com_iss
ue_error(long)" (?_com_issue_error@@YGXJ@Z) referenced in function "public: __th
iscall _com_ptr_t<class _com_iiid<struct="" msxml2::ixmldomdocument2,&struct="" __s_gu
id="" const="" _guid_2933bf95_7b36_11d2_b20e_00c04f983e60=""> >::_com_ptr_t<class _com_ii
id<struct="" msxml2::ixmldomdocument2,&struct="" __s_guid="" const="" _guid_2933bf95_7b36_11
d2_b20e_00c04f983e60=""> >(int)" (??0?$_com_ptr_t@V?$_com_IIID@UIXMLDOMDocument2@MS
XML2@@$1?_GUID_2933bf95_7b36_11d2_b20e_00c04f983e60@@3U__s_GUID@@B@@@@QAE@H@Z)
1>c:\WINDDK\3790.1830\src\print\oemdll\oemui\oemui.dll : error LNK1120: 1 unresolved externals
BUILD: Done
Plz. Let me know how to build a source with XML variable in Windows DDK.
|
|
|
|
|
|
I was willing to compare current date to the system date. But i didnt make it up. i am pasting the project code below. Please assest me or help me in this matter. and one more thing is that how can i compare the CurrentDate to the ProblemDate if it is grater than the CurrentDate It will give me an error.
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
<template xmlns="http://www.xfa.org/schema/xfa-template/2.5/">
<config xmlns="http://www.xfa.org/schema/xci/1.0/">
<agent name="designer">
<destination>pdf
<pdf>
<fontinfo>
<trace>
<present>
<destination>pdf
<pdf>
<fontinfo>
<embed />1
<subsetbelow>100
<interactive>1
<version>1.5
<creator>Adobe LiveCycle Designer 8.0
<producer>Adobe LiveCycle Designer 8.0
<scriptmodel>XFA
<tagged>1
<encryption>
<permissions>
<accessiblecontent>1
<contentcopy>1
<documentassembly>1
<formfieldfilling>1
<modifyannots>1
<print>1
<printhighquality>1
<change>1
<plaintextmetadata>1
<encrypt>
<compression>
<level>6
<compresslogicalstructure>1
<type>
<linearized>1 <batchoutput>
<openaction>
<destination>
<taggedmode>
<viewerpreferences>
<addviewerpreferences>
<duplexoption>
<numberofcopies>
<pagerange>
<silentprint>
<addsilentprint>
<printername>
<common>
<template>
<log>
<to>memory
<mode>overwrite
<uri>C:\DOCUME~1\Junaid\LOCALS~1\Temp\_e3s136fr1fc473jo.log
<threshold>
<uri>
<adjustdata>1
<xsl>
<uri>
<outputxsl>
<uri>
<messaging>
<locale>
<xdp>
<packets>*
<cache>
<macrocache>
<rendercache>
<incrementalmerge>
<runScripts/>
<exclude/>
<currentPage/>
<pagination>
<copies>
<layout>
<to>uri
<uri>C:\Documents and Settings\Junaid\My Documents\Problem Reporting Form.pdf
<acrobat>
<common>
<locale>
<uri>
<adjustdata>1
<xsl>
<uri>
<outputxsl>
<uri>
<template>
<psmap>
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
<xfa:data xfa:datanode="dataGroup">
<localeset xmlns="http://www.xfa.org/schema/xfa-locale-set/2.1/">
<locale desc="English (Canada)" name="en_CA">
<calendarsymbols name="gregorian">
<monthnames>
<month>January
<month>February
<month>March
<month>April
<month>May
<month>June
<month>July
<month>August
<month>September
<month>October
<month>November
<month>December
<monthnames abbr="1">
<month>Jan
<month>Feb
<month>Mar
<month>Apr
<month>May
<month>Jun
<month>Jul
<month>Aug
<month>Sep
<month>Oct
<month>Nov
<month>Dec
<daynames>
<day>Sunday
<day>Monday
<day>Tuesday
<day>Wednesday
<day>Thursday
<day>Friday
<day>Saturday
<daynames abbr="1">
<day>Sun
<day>Mon
<day>Tue
<day>Wed
<day>Thu
<day>Fri
<day>Sat
<meridiemnames>
<meridiem>AM
<meridiem>PM
<eranames>
<era>BC
<era>AD
<datepatterns>
<datepattern name="full">EEEE, MMMM D, YYYY
<datepattern name="long">MMMM D, YYYY
<datepattern name="med">D-MMM-YYYY
<datepattern name="short">DD/MM/YY
<timepatterns>
<timepattern name="full">h:MM:SS A Z
<timepattern name="long">h:MM:SS A Z
<timepattern name="med">h:MM:SS A
<timepattern name="short">h:MM A
<datetimesymbols>GyMdkHmsSEDFwWahKzZ
<numberpatterns>
<numberpattern name="numeric">z,zz9.zzz
<numberpattern name="currency">$z,zz9.99
<numberpattern name="percent">z,zz9%
<numbersymbols>
<numbersymbol name="decimal">.
<numbersymbol name="grouping">,
<numbersymbol name="percent">%
<numbersymbol name="minus">-
<numbersymbol name="zero">0
<currencysymbols>
<currencysymbol name="symbol">$
<currencysymbol name="isoname">CAD
<currencysymbol name="decimal">.
<locale desc="English (United States)" name="en_US">
<calendarsymbols name="gregorian">
<monthnames>
<month>January
<month>February
<month>March
<month>April
<month>May
<month>June
<month>July
<month>August
<month>September
<month>October
<month>November
<month>December
<monthnames abbr="1">
<month>Jan
<month>Feb
<month>Mar
<month>Apr
<month>May
<month>Jun
<month>Jul
<month>Aug
<month>Sep
<month>Oct
<month>Nov
<month>Dec
<daynames>
<day>Sunday
<day>Monday
<day>Tuesday
<day>Wednesday
<day>Thursday
<day>Friday
<day>Saturday
<daynames abbr="1">
<day>Sun
<day>Mon
<day>Tue
<day>Wed
<day>Thu
<day>Fri
<day>Sat
<meridiemnames>
<meridiem>AM
<meridiem>PM
<eranames>
<era>BC
<era>AD
<datepatterns>
<datepattern name="full">EEEE, MMMM D, YYYY
<datepattern name="long">MMMM D, YYYY
<datepattern name="med">MMM D, YYYY
<datepattern name="short">M/D/YY
<timepatterns>
<timepattern name="full">h:MM:SS A Z
<timepattern name="long">h:MM:SS A Z
<timepattern name="med">h:MM:SS A
<timepattern name="short">h:MM A
<datetimesymbols>GyMdkHmsSEDFwWahKzZ
<numberpatterns>
<numberpattern name="numeric">z,zz9.zzz
<numberpattern name="currency">$z,zz9.99|($z,zz9.99)
<numberpattern name="percent">z,zz9%
<numbersymbols>
<numbersymbol name="decimal">.
<numbersymbol name="grouping">,
<numbersymbol name="percent">%
<numbersymbol name="minus">-
<numbersymbol name="zero">0
<currencysymbols>
<currencysymbol name="symbol">$
<currencysymbol name="isoname">USD
<currencysymbol name="decimal">.
<pdfsecurity xmlns="http://ns.adobe.com/xtd/" accessiblecontent="1" change="1" contentcopy="1" documentassembly="1" formfieldfilling="1" metadata="1" modifyannots="1" print="1" printhighquality="1">
<subform name="form1">
<instancemanager name="_">
<subform>
<draw name="StaticHelpDeskRequest">
<draw name="CompanyLogo">
<draw name="StaticCompanyName">
<draw name="StaticAddress">
<draw name="StaticCityState">
<draw name="ZIPPostalCode">
<draw name="Phone">
<draw name="StaticFax">
<draw name="StaticWebSite">
<draw name="Line1">
<draw name="Line1">
<draw name="Line1">
<field name="PrintButton1">
<field name="EmailSubmitButton1">
<draw name="StaticText1">
<field name="ResetButton">
<field name="EmployeeName">
<field name="Department">
<field name="Location">
<field name="Description">
<field name="Region">
<field name="Ticket">
<field name="ProblemDate">
<instancemanager name="_">
<subform>
<field name="PreparedBy">
<field name="Signature">
<field name="CurrentDate">
<instancemanager name="_">
<subform>
<field name="PreparedBy">
<field name="Signature">
<field name="ApprovedDate">
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.0-c316 44.251264, Sun Sep 17 2006 17:15:19">
<rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:description xmlns:xap="http://ns.adobe.com/xap/1.0/" xmlns:xapmm="http://ns.adobe.com/xap/1.0/mm/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="" xap:modifydate="2007-07-11T12:17:54+03:00" xap:createdate="2007-07-04T12:15:43+03:00" xap:metadatadate="2007-07-11T12:17:54+03:00" xap:creatortool="Adobe LiveCycle Designer 8.0" xapmm:documentid="uuid:73ceb2ad-2973-4b62-91b0-1abffd451fb4" xapmm:instanceid="uuid:bbc1e181-4025-48d2-8117-9b22f01289c1" dc:format="application/pdf" pdf:producer="Adobe LiveCycle Designer 8.0">
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<annots>
|
|
|
|
|
Hi
I have to print 14col x 3 rows = 42 labels from my asp.net. I use Xslt transform to display the labels in the aspx page and label width and height also specified in xslt. Also i use style sheet to set paper size a4, and margins,,. When the resultant page is sent to printer from the IE-->Print the Height of each row is shrinked. Any suggestions please.
-- modified at 6:24 Wednesday 11th July, 2007
|
|
|
|
|
CSS has an @-rule for printing: "print". You can use this @-rule to create rules for printing. However, a "Label" in ASP.NET is really a "span" element in the client's browsers. A "span" element is in-line; thus, takes the height of its content. The "height" attribute doesn't have any effect on it. Nevertheless, you can set the said "span" elements' style to "display: block". Consequently, the height attribute will then be effective.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Thanks for your reply George. i have piced the records from db. and using xslt, i transform to html with 3 columns and and 14 rows. I set the paper size to a4 using @print in style sheet. But When printed from a browser(ie), Table size and Table row shrinks a little. Values given in the xslt for each row and table dimensions are not reflected exactly in print. Does the display:block applies to Row of a table in html?
Any suggestions or ideas plz..?
Thank you George
|
|
|
|
|
Unfortunately, CSS1 and <table> don't work well together. Also, it is very difficult to print from HTML exactly the way you want it. I usually generate a PDF (using Crystal Reports) for my clients to print.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Please,I want some help about XSL , for my XML field <description>
it has an image and link like this
<description>
- ]]> aaaaaaaaaaaaaa
My code is --> <xsl:value-of select="description"> but it's show only text no image appear,Iwant to know how to command to show image and link in XLS forms.
thank you.
Kitty
|
|
|
|
|
That's a HTML tag, it's only going to show an image in a web browser.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Is using the html namespace what you're looking for?
<html:img src="http://www.innnews.co.th/crime/47619.jpg" border="0" align="left" width="100" alt="sssss'">
|
|
|
|
|
Hi All
I have created a web service that receive data from an embedded device and dumps the data in a SQL2005 database.
I need now to read this data base and when a new user is added he or she must gets access to the reporting service of SQL2005.
I was thinking of writing a web method that will create the user as required. But I get a access denied error, which I understand, now the question
How do I side step this problem?
Progress is a process , so value it
|
|
|
|
|
Sorry here is the code
<webmethod()> _
Public Function Create_users_on_server(ByVal login As String, ByVal User_password As String, ByVal password As Integer)
Dim x As VariantType
Dim dirEntry As DirectoryEntry
dirEntry = New DirectoryEntry("WinNT://" + Environment.MachineName + ",computer")
Dim entries As DirectoryEntries = dirEntry.Children
If password = (PassWordFactor * System.DateTime.Now.Day) Then
' Set login name and full name.
Dim newUser As DirectoryEntry = entries.Add(login, "User")
newUser.Properties("Description").Add(login)
' User must change password at next logon (1 - true, 0 - false)
newUser.Properties("PasswordExpired").Add(0)
' Password never expires.
'newUser.Properties("PasswordAge").Add(0)
' Set flags - User Cannot change password | Password never expires.
newUser.Properties("Userflags").Add(&H40 Or &H10000)
' Set the password.
Dim result As Object = newUser.Invoke("SetPassword", User_password)
x = newUser.Path
newUser.CommitChanges()
' Add user to the group "Members"
Dim grp As DirectoryEntry = dirEntry.Children.Find("Members", "group")
If (Not grp Is Nothing) Then
grp.Invoke("Add", New Object() {newUser.Path.ToString()})
End If
End If
End Function
Progress is a process , so value it
|
|
|
|
|
Hai Good Morning...
I need to update the xml file dynamically in vc++. i did parsing to the xml file then i displaying the parsed values in treectrl. now i am goin to edit the values in the ctrl...which means i will rename the values or deleting the values if i did these changes in treectrl i need to update the same values in XML file also....
any idea....
pls reply me
|
|
|
|
|
Hi,
I think that you should create DOM tree for your XML file and show it tree control. When you update anything in tree control, you should automatically update data in you DOM document. When you finish your changes (before you close your application, for example) you'll simple save DOM document. That's all. But if you have so big XML file this is not a good idea. You should use SAX to load you document and you should generate new XML file when you save changes.
I used these things in C#, but I think that there are some equivalents in C++. For example, I can recommend you Xerces. This is good cross-platform C++ library.
|
|
|
|
|
Hi,
Hi!
I’m writing an application that reads XML files that are auto generated form another application called Xapp.
My application is supposed to extract certain data from the generated XML files. Lets say that I need to extract the values from a number of caluclations done by Xapp called A and C in the example below.The calculations that aren't measured wont be listed so the files will variate quite much. A won't be present if its not calculated. What is the best and most dynamic way of extracting the data? I found the xmlreader abit to static. Is Xpath the right way? I’m developing in .Net 2.0
(very simplified example )
<Container>
<meaning>Calculations </meaning>
<Container>
<meaning> A</meaning>
<value>4.9</value>
</Container>
<Container>
<meaning> B</meaning>
<value>1.0</value>
</Container>
<Container>
<meaning> C</meaning>
<value>2.0</value>
</Container>
</Container>
Many Thanks
/Ibana
|
|
|
|
|
Personally, I'd build an XML serializable model to read XML into live objects. Then your controlling app can iterate through the graph to get whatever values you need, or you can alter the generated model to do calculations on itself. You can do this with XSD.exe or something like Skeleton Crew[^]. I'm not big on XmlReader or using XPath with XmlDocument, but they are also both reasonable approaches. If you only need the values from one type of node, maybe XPath would be less work. But if you are going to need anything else from your XML, you might want to look at a serializable model.
|
|
|
|
|
hello freinds,
I'm fresher and i'm trying to do a project of my own interest.THe project is to prepare microsite. The data is given as excel sheet and i need to convert that excel data into xml and using xslt i planned to show it in the web page. But i dont know how to convert excel data into xml.I want to know how to prepare dynamic xml file for the excel data.Pls tell me the code to convert into xml.I need the code to be work in jsp and the output xml code to be stored as file.
Awaiting ur reply soon.
knowledge seeking guy
|
|
|
|
|
Sir,
I am very new to Biztalk server development env. I have created a flatfile schema. When I say Validate Schema its giving all the records in the flatfile and they are correct. But when I say genenrate instance it is showing only dummy record, that too only one.
What I want to do is I have a flat file and that flat file data I want to process in some functoids in Biztalk maps. But its not giving what result I want pls. help me. Thank you.
Regards,
Aleem.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|