|
Google[^] has a heap of info on C# XSLT extensions
It would return a nodeset, so any values that match will be returned.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi All!
I use XmlSerializer to serialize object and got the following:
<?xml version=\"1.0\" encoding=\"utf-16\"?>
<MyClass xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.MyFirma.biz/MyNamespace\">
<Positions>
<Position>
</Position>
...
</Positions>
</MyClass>
Is it possible to get rid of the overhead (namespace info, schema info, xml version)? Anyway I do not need this info since parsing will be done without XmlSerializer.
So I need that output looks like below:
<MyClass>
<Positions>
<Position>
</Position>
...
</Positions>
</MyClass>
Thanks!
|
|
|
|
|
Hi There,
Do you know how to serialize a button or textbox
|
|
|
|
|
convert interbase database file into sql server database
My question is that through interbase database i have text file and again i want to convert that file in sql server database or any ms-access database is it possible so what r the steps.....
plz reply soon..
brijesh
|
|
|
|
|
How can i insert a .gif image in my XSLT document, so it can be seen in the output (html)?
|
|
|
|
|
If it's html, then it needs to be an img tag, so the gif file needs to be external to the output.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi guys,
I'm doing a project and i'm stuck up with the problem,that is can i store and retrieve my data in the form of XML files.If yes how can i do it as my scripting language is PHP.Please help me guys i'm searching for this for the last 2 weeks.
Manish
|
|
|
|
|
It's pretty straightforward, what bit is worrying you ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
how xml and xslt work together?? how do they link to each other eg. codes that make them work together?? can someone provide a example??
Han
|
|
|
|
|
You'd probably be better off asking a question like this in the XML / XSL forum.
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
Please do NOT post programming questions or ads to this forum
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
|
Ian Darling wrote:
Well whaddyaknow, it works
If you liked that, try using for VB and for AJAX.
Jonathan Newman
blog.nonny.com [^]
|
|
|
|
|
A document in xslt language tells to an xslt prosessor how we want an xml document to be transformed. The output can be xml too.
The xslt documents are xml files, but restricted to the xslt schema.
At my article http://www.codeproject.com/aspnet/CXML.asp[^] i use xslt in the IIS/aspx.
|
|
|
|
|
Hi friend,
I am developing a web application and using XML files to store data.
I want to display data of an xml file using XML stylesheet. I found tutorials regarding this but everywhere the extension of xml stylesheet is XSL. and in .net I found that file with .XSLT file.
I used that file but when I tried to view XML file in the browser it gives error that any html key word like "HTML","BODY","H1" may not be used here.
What does it mean?
Can any one tell me how to use xmlstylesheet to display xml file on browser other than the typical way?
thank u all in advance.
|
|
|
|
|
You can use the .xsl extension if that's what the browser reqires.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a XML file:
<CARO_BOARD row=10 col=10>
<CHESS x=1 y=1 sign="X"/>
<CHESS x=1 y=2 sign="0"/>
<CHESS x=3 y=1 sign="X"/>
<CHESS x=4 y=4 sign="0"/>
</CARO_BOARD>
I want to use XSLT to show this file as table(rows=10 and cols=10) and the value in cell(1,1) is 'X',the value in cell(1,2) is '0'...Others cell is NULL.
Please tell me a solution.
Thanks.
-- modified at 2:30 Friday 23rd September, 2005
|
|
|
|
|
Hope this sample XSL file will work for you.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table border="2" rows="10" cols="10">
<xsl:for-each select="CARO_BOARD/CHESS">
<xsl:variable name="test_x" select="@x" />
<xsl:variable name="test_y" select="@y" />
<tr>
<xsl:if test="$test_x =1 and $test_y=1" >
<td><xsl:value-of select="@sign"/></td>
<td>NULL</td>
</xsl:if>
</tr>
<tr>
<xsl:if test="$test_x =1 and $test_y=2" >
<td>NULL</td>
<td><xsl:value-of select="@sign"/></td>
</xsl:if>
</tr>
<xsl:comment>You can include more if statements </xsl:comment>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
-- modified at 5:05 Tuesday 27th September, 2005
|
|
|
|
|
Thanks a lot!
But the number of rows(=10) and the number of cols(=10) can be changed.I don't want to hard code like "
"
So is there a solution?
|
|
|
|
|
Actually using DHTML it is possible to change velues of attributes in HTML tag but i think it'll be difficult to use in XSL file but i'll try to find out solution of this problem.
|
|
|
|
|
Finally i have done what u actually want
Let this is ur XML file in which u have defined row,col and border
<CARO_BOARD row="3" col="10" border="3">
<CHESS x="1" y="1" sign="X"/>
<CHESS x="1" y="2" sign="0"/>
<CHESS x="3" y="1" sign="X"/>
<CHESS x="4" y="4" sign="0"/>
</CARO_BOARD>
----------------------------------------
In this xsl we can use xsl:attribute-set to set attributes of table.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:attribute-set name="set_table">
<xsl:attribute name="border">
<xsl:variable name="chk_border" select="//@border" />
<xsl:value-of select="$chk_border"/>
</xsl:attribute>
<xsl:attribute name="cols">
<xsl:variable name="chk_cols" select="//@col" />
<xsl:value-of select="$chk_cols"/>
</xsl:attribute>
<xsl:attribute name="rows">
<xsl:variable name="chk_rows" select="//@row" />
<xsl:value-of select="$chk_rows"/>
</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<html>
<body>
<table xsl:use-attribute-sets="set_table">
<xsl:for-each select="CARO_BOARD/CHESS">
<xsl:variable name="test_x" select="@x" />
<xsl:variable name="test_y" select="@y" />
<tr>
<xsl:if test="$test_x =1 and $test_y=1" >
<td><xsl:value-of select="@sign"/></td>
<td>NULL</td>
</xsl:if>
</tr>
<tr>
<xsl:if test="$test_x =1 and $test_y=2" >
<td>NULL</td>
<td><xsl:value-of select="@sign"/></td>
</xsl:if>
</tr>
<xsl:comment>You can include more if statements </xsl:comment>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
please let me know if u have any further query.
-- modified at 2:47 Monday 3rd October, 2005
|
|
|
|
|
Hi,
I was wondering whether with all these ASP.NET controls available, is XSLT still a good technology to persue? I know that its still the best way to transform XML into other formats, but if we are only interested in dragging data off a DB and displaying on web pages, wouldn't things like ASP.NET DataGrids/Lists etc. be a better choice?
We used to do a lot of XSLT trans when we were using classic ASP (we kindda hated the ASP Design Time Controls).
I kindda get the impression that ASP.NET Server controls wouldn't go well with XSL (e.g. you can't build a web page containing server controls through a XML->XHTML transform using XSL, right?).
Cheers,
Sameera
|
|
|
|
|
Hi Everyone,
I generate an xml file like:
<links><title>sth..
<desc>sth desc
<title>sth..
<desc>sth desc
and I use ASP to parse and display it in a webpage, my asp code works very well to most of the xml files, but there is one file it can not parse, and if I change the "sth desc" in the <desc> tag, it works fine.
Because the desc comes from database, I wonder if there are some limited (like length or special charaters)for the content in the tag?
Please help me!!
Thanks a lot in advance!
Alan
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
this probably an easy question but i am new to xml. how do i use an xml document to store informatiion needed by my program? i know how to create the xml document itself but dont know how to do any thing with it after that (including opening it so the program can access it, compare strings to the data in the xml document, and write to the document from the program).
i hope this is an easy question for someone to answer. any help would be greatly apprectiated. examples of code would be extremely helpful.
Kyle
|
|
|
|