|
Hello friends,
I need to write a xml tag, where its attribute value will be like this.
<inputparameter parametervalue="<a>s</a>" parametername="Text">
but this s giving me error, i don't want to write < >. Even i try with Cdata like this
<inputparameter parametervalue="<!CDATA[<a>s</a>]>" parametername="Text">
but still it giving me error.
Can you please help me for the same.
Sachin Gedam
(Software Engg.)
Pune India
|
|
|
|
|
|
I tried the sample code from MS
http://support.microsoft.com/default.aspx?scid=kb;en-us;312114
I got the error message at
chatcenter.Submission += new SubmissionEventHandler(callback.SubmissionCallback);
Type System.DelegateSerializationHolder and the types derived from it (such as System.DelegateSerializationHolder) are not permitted to be deserialized at this security level.
it seems the delegate will not pass security check in remote object.
Does any body know why?
I am using .NET 2003 Enterprise version
Thank You
|
|
|
|
|
How can I use '<' and '>''s in the text of an xml element with out it thinking it's another element?
<pre><param name="p.table.data" value="(?n:^(?=\d)((?<month>(0?[13578])|1[02]|(0?[469]|11)(?!.31)|0?2(?(.29)(?=.29.((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579][26])00))|(?!.3[01])))(?<sep>[-./])(?<day>0?[1-9]|[12]\d|3[01])\k<sep>(?<year>(1[6-9]|[2-9]\d)\d{2})(?(?=\x20\d)\x20|$))?(?<time>((0?[1-9]|1[012])(:[0-5]\d){0,2}(?i:\x20[AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$)"/></pre>
For example the "<month>" and "<sep>", how can I escape those in the xml?
/\ |_ E X E GG
|
|
|
|
|
< and >
In .NET code just use HttpUtil.HtmlEncode() . Or something like that. However I consider attributes as atomic, I wouldn't put XML (structured data) in them... Btw you say "in text" but in example use attribute - which one you really mean? If text then you can use <!CDATA[ ]> I'd prefer that over encoding, because you can more easily read you markup inside that CDATA if you need. (I can imagine it is good at least for debugging).
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Hey guys,
I'm new to xsl, however, I literally have spent a long time trying to simply get the sum of some element nodes. For example:
<Data>
<Books>
<Book Name="Endurance" />
<Book Name="Tommorow" />
<Book Name="Easy Money" />
</Books>
</Data>
I'm trying to use <xls:number> to get the sum of the 'Book' elements.
<xsl:template match="/">
<Count>
<xsl:number count="Data/Books/Book" />
</Count>
</xsl:template>
The output is merely:
<Count>
</Count>
Does anyone know why the count="PATTERN" isnt working?
-- modified at 16:18 Thursday 30th March, 2006
|
|
|
|
|
Well,
I found it! Here is the solution if anyone is interested:
<xsl:template match="/">
<Count>
<xsl:apply-templates />
</Count>
</xsl:template>
<xsl:template match="Data/Books">
<xsl:value-of select="count(Book)" />
</xsl:template>
CHEERS!
And I hope it helps someone else.
-- modified at 16:18 Thursday 30th March, 2006
|
|
|
|
|
Good Day Everyone,
Is there any way to pass parameters to xsl file? I have to pass parameters to xsl through url like:
XYZ.xsl?param1=1000
But, its showing me illegal character error.
Is there any hope?
Thanks for the help.
|
|
|
|
|
Yes, you can pass parameters, but you need to define them in your xsl file. I'm not sure if it can be done on the browser command line.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yes, taht can be done through xsl:param but the need is to pass parameters in the url. Is there still any way out?
Thanks.
|
|
|
|
|
Hi
1. What is better to use - Xpath or Xquery ?
Data is in Northwind XML and I have an XSD(for the schema).
I have to display all the orders(with all its details),product details and Customer details.
Northwind xml has :-
Different Elements under the root element and information is location in various sub elements in different root element.
2. When I have an Xsd file I can verify the xml file for consistency.
Is there any other use of XSD File besides this ?. Also will it
complement any functionality that i am trying to implement with
Xpath/Xquery.
thanks..Loki.
|
|
|
|
|
XQuery is in 2.0 only. XQuery is more like xslt than xpath.
loki_l77 wrote:
Is there any other use of XSD File besides this ?.
No.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi All,
I am new to XML. I have a problem..
I have written the following code in XML to display some bengali font. But when I tried to view it through IE 6.0, it is showing something else. Is there any special configuration that I need to do to display the Bengali fonts?
<?xml version = "1.0" encoding = "utf-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<test>
র
ী
</test>
Please help me out...
|
|
|
|
|
Dear All,
It is displayed properly on a XP machine. But it is not displayed on a 98 machine, although I have installed the font.. I would like to know what are the things does the Unicode display depend on?
Please help me out.
|
|
|
|
|
|
Hi,
I have a class that has all the relavent attributes in order to serialise it to an xml doc, but I do not wish to include the namespace declaration, that is added by default, is there a way to prevent this?
|
|
|
|
|
hi,
can anyone let me know how the instance can be generated from schema
programatically using C# on VS2003.
This is the code i am using to retrieve the attributes.This part of the code is not executed as the attribute count is ZERO.
if(elem.ElementType is XmlSchemaComplexType)
if (ct.AttributeUses.Count > 0)
{
IDictionaryEnumerator ienum = ct.AttributeUses.GetEnumerator();
while (ienum.MoveNext())
{
XmlSchemaAttribute att = (XmlSchemaAttribute) ienum.Value;
Console.Write("Attribute: {0} ", att.Name);
}
}
}
please help
Thanks in Advance
vinutha
|
|
|
|
|
<a>
<b>b</b>
<c>c</c>
</a>
If I get Element A , and want to get element b from A.
How to do?
Thanks!
|
|
|
|
|
There is no element A, XML is case sensitive. The XPAth /a/b will get element b. /a will get a, and /b will get b from a. The question is, how are you accessing it ? If I know that, I can give you some code. The DOM has a SelectSingleNode method, which is what you would use here.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi there,
I'm working on a small/quickshot web project and I would like to store the (globalized) text content of the page in an xml file. Before I actually start with this approach, I'm wondering how someone would store html-tags within an xml node so that the parser doesn't freak out.
thanks in advance!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
if your html is XHTML (or at least well formed) then you don't have a problem... If it is not (e.g unclosed tags) you can use CDATA sections.
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
|
Every element is node, but not every node is element For example <!CDATA[ ]> is node, but not element. Hmm maybe this hierarchy[^] will make it clearer (XmlLinkedNode derives from XmlNode )
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
I have one node that contain number say NoofMonth
and one node that contain AmountPerMonth
now
i want to display based on no of months that amount
like if NoofMOnth =5
Amountpermonth=100
then i want to display 100 100 100 100 100
for(i=NoofMonth;i>0;i--)
{
<xsl:value-of select="Amountpermonth">}
how to using XSL
Nishant
|
|
|
|
|
You can't do that with xsl:for-each, as that'll only loop over a node-set.
Easiest way would be to use a recursive template:
{in your main template}
<xsl:call-template name="DoAMonth">
<xsl:with-param name="Count" select="NoofMonth"/>
<xsl:with-param name="What" select="AmountPerMonth"/>
</xsl:call-template>
{rest of your main template}
<xsl:template name="DoAMonth">
<xsl:param name="Count"/>
<xsl:param name="What"/>
<xsl:if test="$Count>0">
<td><xsl:value-of select="$What"/></td>
<xsl:call-template name="DoAMonth">
<xsl:with-param name="Count" select="$Count-1"/>
<xsl:with-param name="What" select="$What"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|