|
Sorry, Just looking for help I am new.
Learning to Code
|
|
|
|
|
Hi All,
I have this XML files here:
<?xml version="1.0" encoding="utf-8">
<?xml-stylesheet type="text/xsl" href="TimesheetSQLScript.xsl"???>
<myfields>
<timesheetid>
<companycode>CCCRM</companycode>
<employee>Adrian</employee>
<weekpick>2008-09-15</weekpick>
<startdate>2008-09-15</startdate>
<note></note>
<enddate>2008-09-21</enddate>
<monday>
<mondate>2008-09-15</mondate>
<moncheck>
<moncheckin>14:10:00</moncheckin>
<moncheckout>15:44:00</moncheckout>
</moncheck>
<moncheck>
<moncheckin>16:44:00</moncheckin>
<moncheckout>22:50:00</moncheckout>
</moncheck>
</monday>
</timesheetid>
</myfields>
And I applied this XSL:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="utf-8" />
<xsl:template match="/">
Declare @TimeCardID int
<xsl:apply-templates select="myFields/TimesheetID/Monday" />
</xsl:template>
<xsl:template match="Monday">
<xsl:text>set @TimeCardID = exec spCreateTimeCard '</xsl:text>
<xsl:value-of select="MonDate" />
<xsl:text>', '</xsl:text>
<xsl:value-of select="/myFields/TimesheetID/Employee" />
<xsl:text>'</xsl:text>
<xsl:for-each select="MonCheck">
exec spCreateTimeCardSession @TimeCardID, '
<xsl:value-of select="MonCheckIn" />
<xsl:text>', '</xsl:text>
<xsl:value-of select="MonCheckOut" />
<xsl:text>'</xsl:text>
</xsl:for-each>
</xsl:template>
It generate this sql statement:
Declare @TimeCardID int
set @TimeCardID = exec spCreateTimeCard '2008-09-15', 'Adrian'
exec spCreateTimeCardSession @TimeCardID, '
14:10:00', '15:44:00'
exec spCreateTimeCardSession @TimeCardID,
'16:44:00', '22:50:00'
but this is not what i want, is there a way that i can generate this statement like this:
Declare @TimeCardID int
set @TimeCardID = exec spCreateTimeCard '2008-09-15', 'Adrian'
exec spCreateTimeCardSession @TimeCardID, '14:10:00', '15:44:00'
exec spCreateTimeCardSession @TimeCardID, '16:44:00', '22:50:00'
Thanks in advance </xsl:stylesheet>
|
|
|
|
|
don't worry folks, i fixed by myself. just have to put <xsl:text></xsl:text> tags like this:
exec spCreateTimeCardSession @TimeCardID, '<xsl:text></xsl:text>
|
|
|
|
|
How can I create a schema for the following?
<Data>
<Value unit="m/s">10</Value>
<Value unit="ºF">25</Value>
</Data>
I would like to have the following description in the xsd
<xs:complexType name="rootSchema">
<xs:sequence>
<xs:element name="Value" type="valueSchema" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:element name="Multicalc" type="rootSchema" />
How do I write the definition of valueSchema?
(I hope I didn't make any mistakes in the definitions. I simplified things a bit compared to my own xsd.)
|
|
|
|
|
see if this works
<xs:complexType name="valueSchema">
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="unit" type="xs:string" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
led mike
|
|
|
|
|
Thanks a bunch. It did the trick it seems.
|
|
|
|
|
I want to add rss feed into the html page, but I have a problem. When I displayed the xml file with xsl. It only works at IE, but doesn't work at Firefox.
Tell me why? Thanks.
|
|
|
|
|
josseph.zhang wrote: When I displayed the xml file with xsl. It only works at IE, but doesn't work at Firefox.
Tell me why?
You need to explain this in more detail:
josseph.zhang wrote: I displayed the xml file with xsl
led mike
|
|
|
|
|
I am assuming you are using the Style Sheet Processing Instruction,
<?xml-stylesheet type="text/xsl" href="filename.xslt"?><br /> . Not all browsers (especially their older versions) are able to transform XML using this Processing Instruction. However, the following link may be helpful: http://www.ibm.com/developerworks/web/library/x-think40/[^].
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Yes, you are clever.I used it.The link given is very useful to me. Thanks a lot.
|
|
|
|
|
All
I have a web service that has been working fine until yesterday evening, I don't remember making any changes, but for some reason since yesterday evening I am getting the message "WSE910: An error happened during the processing of a response message, and you can find the error in the inner exception. You can also find the response message in the Response property." with inner exception as "Root Element Missing". I checked the xml file generated and can't find anything mistakes in it. I am using the same machine as client/server so there is no point of time difference.
Appreciate your help
Sri
|
|
|
|
|
Srikant Talasila wrote: I am using the same machine as client/server so there is no point of time difference.
What does "no point of time difference" mean?
led mike
|
|
|
|
|
Do you know what a Root Element is?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi,
I have a problem, I must create an XML document from Excel, but I don't know how to setup two primary nodes. XML document has this format
<?xml version="1.0" encoding="UTF-8" ?>
- <EasyfattProducts AppVersion="DaneaEasyfatt.2006.17.00">
- <Products>
- <Product>
<InternalID>1</InternalID>
<Code>xxx</Code>
<Description>xxx</Description>
</Product>
</Products>
</EasyfattProducts>
I'm using a project of Raymond Pang that I downloaded in this web-site.
Help me please!
Excuseme for my bad english!
|
|
|
|
|
izzy87 wrote: but I don't know how to setup two primary nodes.
That does not explain your problem. Maybe you should try again, and remember, we cannot read your mind.
led mike
|
|
|
|
|
Hello there
I am working on a 3D project, and I have xml files here but I want to transform them so they can be used. Does anyone know any good software for this
Thanks
Andrew McIntyre
|
|
|
|
|
Welcome to CodeProject
Take the time to read this handy forum guidelines article[^]
MrMcIntyre wrote: I have xml files here but I want to transform them so they can be used. Does anyone know any good software for this
Well, we are mostly software developers here, not clairvoyants.
You have what in XML files?
You want to transform into what?
So they can be used for what?
led mike
|
|
|
|
|
Well the XML files contain programming which will make the menus like for login or character creation ect.
Andrew McIntyre
|
|
|
|
|
I think you might be missing a concept here at codeproject. You are asking people to help for free. The least you can do is put in sufficient effort to communicate your situation and needs. What you have posted in this thread is not near that level of effort.
led mike
|
|
|
|
|
How can I put effort in if I want help on the subject.
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: How can I put effort in if I want help on the subject.
What is your damage dude?
led mike wrote: The least you can do is put in sufficient effort to communicate your situation and needs.
led mike
|
|
|
|
|
Can you emphasize for "your damage" what do you mean by this?
Andrew McIntyre
|
|
|
|
|
You are being too general with your request for help. There are all kinds of products that can transform any type of XML file. However, all projects have requirements and constraints which you failed to mention in regards to your XML files. Furthermore, XML can be tranformed into many different documents. So, what is your motivation?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
I am making a virtual world virtual world require xml files for the menus and with lua files supporting the xml files.
Andy
|
|
|
|
|
Unfortunately, I don't know anything about this. Do you have any links or examples of what you need to do?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|