|
hi there. i was just wondering whether a developer should use wfs/wms in implementing a gml map.
|
|
|
|
|
How do you get the underlying stylesheet content of an XslTransform object in .NET? In other words, how do you know what transformation the XslTransform object does? Assume that the object was created and loaded with something somewhere else, but you don't know what was loaded to it. You want to know exactly what was loaded to it (the content of the stylesheet file that was loaded to the object).
What property of the object will let you see that?
Thanks
Shell
|
|
|
|
|
Currently I'm in the process of writing a simple XSL to transform XHTML to the XML format understood by TallPDF.NET[^].
I struggle with a simple thing: Paragraphs with bold and italic. Here is an example:
<p>This is some text in <b>bold</b> and in <i>italic</i>.</p> Now I want to transform it to something like this:
<textPragraph>
<fragment>This is some text in </fragment>
<fragment bold="true">bold</fragment>
<fragment> and in </fragment>
<fragment italic="true">italic</fragment>
<fragment>.</fragment>
</textParagraph> I.e. make the nested original XHTML into a flat list.
I'm not that XSL-T expert, so maybe someone can answer my questions:
- Is it possible at all to do that in XSL (please remember that I usually don't know which tags are nested inside each other)?
- If yes, could you provide a simple example as a starter for me?
Thanks
Uwe
--
Affordable Windows-based CMS: www.zeta-producer.com
|
|
|
|
|
I have the following code:
Start Date
<xsl:attribute name="value">
<xsl:apply-templates select="StartDateTime">
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
which gives me a selection box with years from 2000 to 2010 and it is working properly. However, I wanted to make it more generic displaying years from current year - 5 to current year + 5. For that I have the following function:
<msxsl:script xmlns:msxsl="urn:schemas-microsoft-com:xslt" language="javascript" implements-prefix="extra">
function getYearListBoxOptions()
{
var sYear;
var sOptions = "";
var dateNow;
var i = 0;
dateNow = new Date();
sYear = dateNow.getYear() - 5;
for (i=0; i < 11; i++)
{
sOptions = sOptions + "<option value=" + '"' + (sYear + i) + '"' + ">" + (sYear + i) + "</option>"
}
return sOptions;
}
Now, the xsl looks like this:
But, I am getting an empty selection box ..Can somebody tell me what is going wrong?
|
|
|
|
|
Reposting as the 1st post had some parts missing
I have the following code:
Start Date
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
which gives me a selection box with years from 2000 to 2010 and it is working properly. However, I wanted to make it more generic displaying years from current year - 5 to current year + 5. For that I have the following function:
function getYearListBoxOptions()
{
var sYear;
var sOptions = "";
var dateNow;
var i = 0;
dateNow = new Date();
sYear = dateNow.getYear() - 5;
for (i=0; i < 11; i++)
{
sOptions = sOptions + "" + (sYear + i) + ""
}
return sOptions;
}
Now, the xsl looks like this:
But, I am getting an empty selection box...Can somebody tell me what is going wrong?
|
|
|
|
|
jignatiu wrote:
Now, the xsl looks like this:
hmm, and where is your XSL?? I think you meant something like
&xsl:template match="select">
....
<xsl:template/>
or am I missing something?
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
The whole code is given below. I didnt want to put too much code in to my query . And somehow the xsl tags were not visible while posting it here. So, now I have replaced every <xsl tag="" with="" <-.="" hope="" this="" is="" readable.
<-xsl:template="" match="NonWorkingTimeCollection/NonWorkingTime">
HOLIDAY DETAILS | Start Date
<-xsl:choose >
<-xsl:when test="../../BrowserType = 'IE'">
<-xsl:attribute name="value">
<-xsl:apply-templates select="StartDateTime" />
<-/xsl:when>
<-xsl:otherwise>
<-xsl:attribute name="value">
<-xsl:apply-templates select="StartDateTime" />
<-/xsl:attribute>
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
|
|
|
|
|
|
hi
I am a new c# programmer and I wanted to use XML in data exchange.Can any give brief explanation about XSL/XSLT/Xpath.
Thanking you.
Satish
|
|
|
|
|
|
Xpath has a certain functions that can be used in XSL and XSLT. For example,
/ for root node
. for current node
XSL is a stylesheet Which has 2 kinds 1. Transformation 2. Stylesheet
XSLT converts from XML to HTML/XML/Text formats
XSL is based on FO which converts XML to PDF, SVG or other formats using Apache FOP Object
raman
|
|
|
|
|
how to fire update,delete command using sql query in vb.net
|
|
|
|
|
Try query in appropriate forums not in XML forum
raman
|
|
|
|
|
Greetings,
I have table data (reduced) in XML that looks like this:
<tables>
<table>
<header>Text 1</header>
<row/>
<row>Row 1</row>
<row>Row 2</row>
</table>
<table>
<header>Text 2</header>
<row/>
<row/>
<row/>
</table>
</tables>
I wish to create an HTML page displaying the non-empty row data as an actual table. If I just display everything, it is quite simple. However, if all of the row elements are empty (<row/> or <row></row>) for a table node, then I do not want to create that table. Is there a way to do this without looping twice to determine first if there is a non-empty row, then create the table tags?
Thanks
"For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) Web - Blog
|
|
|
|
|
hi,
well I guess the position of rows matters so exclude empty rows from xml is probably not an option...
One (quick&dirty) solution is to keep flag for each table - say hasRows attribute of table element.
Bassam Abdul-Baki wrote:
Is there a way to do this without looping twice to determine first if there is a non-empty row, then create the table tags?
hmm, well.. what about looping once, and keep flag (while creating table) if there were non-empty table? I don't know details so I have no idea what actions are expensive... btw how you do XML->HTML transformation? You said looping, to me it sounds like you are not using XSLT but your own code... is that right? If not my advices would probably differ
hope it helps
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Thanks. Actually, got a tip from another XSL site and got it to work. Had to use table[row!=''] in an apply-template element to make it work. Neat stuff. Too bad that variables are only set once.
"For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) Web - Blog
|
|
|
|
|
Take the stylesheet below
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="table">
<xsl:for-each select="row">
<xsl:if test="string-length(.) > 1">
<xsl:value-of select="."/><br/>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
raman
|
|
|
|
|
Wouldn't this create empty tables for me?
"For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) Web - Blog
|
|
|
|
|
Hi Friends,
I want to learn XML but really confused where to make a start. The available knowledge on net is so much that it is difficult for a new babie to make a start.
Can someone please suggest how shall I make a start. I am looking for some guidelines to be followed in sequence like
1. Basic XML
2. Schemas
3. Parser etc..
I hope you get my point.
Any help is appreciated.
Thanks in Advance
|
|
|
|
|
hi there,
I've got good news basic XML is very easy to learn. Schemas are bit harder, while *parsing* XML is again relatively easy task (unless you need really optimal performance, maybe).
For basic XML, try W3C Schools[^]. From same site (http://www.w3schools.com[^]) you can learn about schemas and much more...
There are some XML parsers here on CodeProject. Just search...
Oh wait You actually don't want to write XML parser, do you? You can use MSXML (ActiveX AFAIK) or System.Xml.XmlReader (.NET framework) or whatever parser you buy/download. Is this your question?
hope it helps. You can come back anytime and ask...
p.s if you are good at reading specifications, see http://www.w3.org/XML[^]
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Hi,
I'm trying to change the values of an attribute and saving the xml file. I'm able to change the attributes value and while saving it is not. Following is the code I have written. Please reply ASAP if anyone know about this.
var xml_doc= new ActiveXObject("Microsoft.XMLDOM");
xml_doc.async = false;
xml_doc.load("test.xml");
var purposes = xml_doc.getElementsByTagName("Purpose");
var iLength = purposes.length;
for (i = 0; i < iLength; i++)
{
purpose = purposes.item(i);
attri = purpose.getAttribute("PurposeCodeDescription");
switch(attri)
{
case "Construction-1st Home" :
purpose.setAttribute("PurposeCodeDescription", "xcvxcvxvxcv-1st Home");
break;
case "Purch New Home Other-Not 1st Home" :
purpose.setAttribute("PurposeCodeDescription", "Purch zcvzxcvxcvxcvxcvxc Home-Not 1st Home");
break;
}
}
for (i = 0; i < iLength; i++)
{
purpose = purposes.item(i);
attri = purpose.getAttribute("PurposeCodeDescription");
document.write(attri + "<br>");
}
xml_doc.save("test.xml");
|
|
|
|
|
Is the generated xml getting saved or not. Do u notice any changes in the xml. Get me a copy of ur xml file or just post the xml n i'll bail u out.
Regards
Wilbur J. Pereira
"If they love me, let them for the heck of it.If they don't, who da heck cares about it"
|
|
|
|
|
Someone hacked my network and used unicode with XML. I want to open these doc's and e mails to see what was done. Can some one help. I will pay for a good decoder.
lawson00@earthlink.net
|
|
|
|
|
|
if you could give me your e mail address i will e mail a couple to you
|
|
|
|
|
how to import and export xml file one machine to another machine in vb.net as well as asp.net
|
|
|
|