|
Hi,
I am using VC++ 6.0 to access a webservice. The returned XML data contains strings with french characters (éèà...). I use a CString to store these strings then add the strings to a list control. The problem is that those characters do not display correctly. For example the word 'Marché' displays as 'Marché'. IE displays the strings correctly.
I guess it is because the strings are encoded someway (unicode ?).
How can I convert those strings to display properly ?
|
|
|
|
|
I have to generate a report where i need to find the total of two items(like total of revenue and expenses).Now using these two sums i need to find total of these two. For this i need to store the sum of both the variables, but the variable needs to be checked before assigned value.. so i need to use xsl:when.. but because of xsl:when i m not able to get the value of the variable. How should i be able to get the value of the variable even when i use the xsl:when? Its in the same template.
|
|
|
|
|
Hi there,
You can assign the value of the variable with the when clause, e.g.
<xsl:variable name="ResultsType">
<xsl:choose>
<xsl:when test="/Search/UserData != ''">
<xsl:value-of select="/Search/UserData"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@Type"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
So rather than using select to assign the variable straight away, we can nest a when clause to determine the value we give to $ResultsType.
Hope this helps,
Andy
|
|
|
|
|
hi,
i'm new to xml and xslt, and i have to ask you for a question.
i have an xml file with the content of a web page and an xslt file associated to it.
From a .net application i create both these file starting from the data stored in a database.
In the page there are some link.
Now the question is:
is it possible to call a class method from the xslt file?
What i need is that when the user clicks on a link some method will be executed within my customer class. Different link calls different methods.
how can i do this?
thanks
|
|
|
|
|
can any body help as how to communicate between different layers of n-tier archietecture using xml. some study material regarding this is really appreciated, please help me out in this.
|
|
|
|
|
HI.
I want to write a schema for kind of an editor control.
It would be similar to html's "" tag. When you look at the there are usually two kind of element like ,.
And each element could be used freely, regardless of order and time. Simple.. but when I’m trying to write a schema..I don’t know how to write it.
The bottom line is how to use elements regardless of order and time.
|
|
|
|
|
Hmm,
Would this work? Don't have time to test it
<xsd:element name="form">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="input" type="xsd:string"/>
<xsd:element name="select" type="xsd:string"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
Cohen
|
|
|
|
|
Thanks Cohen. This is it!
works fine..
|
|
|
|
|
Hi,
I am using typed dataset in my application. Using this typed dataset I need to generate an xml file. I need an element similar to the following
<userID permissions="SCFP" >505050505 </userID>
I tried however I could not achieve above. I could achieve the following
<userID permissions="SCFP" usercode="505050505" />
I used following schema to get the above result.
<xs:element name="userID">
<xs:complexType>
<xs:sequence>
<xs:element name="usercode" type="xs:string" />
</xs:sequence>
<xs:attribute name="permissions" type="xs:string" />
</xs:complexType>
</xs:element>
Please give me a schema which alllow me to generate following XML fragment
<userID permissions="SCFP" >505050505 </userID>
Thanks for your time!!
Sreenath
|
|
|
|
|
Hi..
You could use "mixed="true" attrubute, if your element needs to get a text value beetween tags .
<xs:element name="usercode" type="xs:string" mixed="true" />
|
|
|
|
|
Greetings,
I am trying to only sum up the values from a xml record using a xsl file.
I am currently using msxml 4.0 within a windows xp environment.
Here is my xml data format example:
----------------------------
<?xml version="1.0" encoding="UTF-16"?>
<XML>
<DATA>
<Name>TestName</Name>
<Value>10</Value>
</DATA>
<DATA>
<Name>TestName2</Name>
<Value>15</Value>
</DATA>
<DATA>
<Name>TestName</Name>
<Value>100</Value>
</DATA>
</XML>
What I am trying to do is add all the record's "Value" node where name is equal to "TestName". So I would only add the Value Nodes of "10" and "100" = "110"
(Desired Output
TestName: 110
Thanks in advance for any suggestions!
|
|
|
|
|
I figured it out right after I made the post.
I used "msxsl:node-set" to put my sum data into a variable, and then referenced it from later. For futher information consult the article
"Calculating a Sum of Sums (Final Version)" found in msxml 4.0 help from the sdk.
|
|
|
|
|
Hi
I want to give page breaks using xslt. Also, I want to use next and previous facility using xslt ? Can anyone help me out .
Thanks in advance,
Regards,
Bhagwati Prasad
|
|
|
|
|
I assume you are talking about generating an html content out of XSLT.
While generating the html content out of xslt, just make use of html markup br to get the line break may be you know this already.
Regarding the pagination, the best i can say is to submit the page with the page id and generate html content starting from that page id.
|
|
|
|
|
The problem is that I have many xml records, and I want to separate those
into number of html pages using xsl. One of the answers what I found on internet is xsl-fo, but how to do this in .NET ?
|
|
|
|
|
Do you really want to use XSL for this ? or you thought that is the way ?
If you know the schema already, then you can create a typed dataset and bind an XML to it. This helps you to create any type of file easily and may be fast!! Without getting into trouble of xsl looping.
let me know if this helps you!!
Sri
|
|
|
|
|
no I need to implement using xsl
what I do is, get the data in the dataset, get its xml and then transform it using xslt. The transformation is coming out properly, but now I want to display no of pages, page count etc. using xsl
Can u help ?
Thanks,
Bhagwati
|
|
|
|
|
Bhagwati,
Hope you got enuf information from Parker's messsage.
If not let me know.
bye
Sreenath
|
|
|
|
|
Thanks Srinath and Parker.
I got enough information and it works
Thanks again
Bye
Bhagwati
|
|
|
|
|
|
Hi!
I need to select certain nodes that DON't have specific subnodes, i.e.
Select all nodex x/y where there is no subnode x/y/a or x/y/b
Example:
<x>
<y> <!-- select this one -->
<bla>blup</bla>
</y>
<y> <!-- this one as well-->
<foo>test</foo>
</y>
<y> <!-- this one not: x\y\a -->
<a>bla</a>
</y>
<y> <!-- this one not: x\y\b -->
<b>bla</b>
</y>
</x>
I'd appretiate all suggestions. Thanks in advance!
Regards,
Andre Loker
|
|
|
|
|
Hi Andre. Here's one approach - using a for-each to select only those x/y nodes that don't have a child a or child b node.
<?xml version='1.0' ?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/">
<xsl:for-each select="x/y[not ((descendant::a) or (descendant::b))]">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet> I hope that helps.
|
|
|
|
|
Yes, it works great, thanks a lot!
Regards,
Andre Loker
|
|
|
|
|
I'm reading an XML input file using SAX, if I find that some infor is missing from that file (while I'm parsing it), I want to go to another XML file and see if the info is there (again parsing using sax).
It seems to be working after a fashion, but I keep getting access violations in MSXML4. Can you have more than one reader active at a time parsing more than one file using MSXML?
|
|
|
|
|
I have a commemerce server site and an asp site... i want to exchange xml between the two sites but i need to use soap to get through the firewall... any suggestions on where to start... im new to soap
|
|
|
|