|
Thanks a lot for your response. I am new to XSL, can you please suggest how to define original variable such that it evaluates to a real string value and not a nodeset.
TIA
gund
|
|
|
|
|
Hey Mike
Thanks a lot for your suggestion, I was able to reolve it by changing the variable declaration
<xsl:variable name="client1ID"><xsl:calue-of select="//clients/client/clientId" /></xsl:variable>
and it worked!
Regards
gund
|
|
|
|
|
Hi all,
I have a bunch of XML files, which all together can be considered as a database.
I need to be able to save only one node at a time in an XML file. (such as on tuple at a time in a RDBMS).
I already use DOM in my C++ code to process XML files.
The problem is that the Save() in DOM saves all the the elements of the file.
Which is not what I want.
I have searcher and not found an easy way to do that but I need a generic solution that is data-content independant because I need to do that on different XML files.
I am not very familiar with SAX.
The only thing I can find for the moment:
- Have the xml descrition of the element before I do the Save of my element. ->(string xmlNode1)
- Extract the XML from IXMLDOMElement with the "xml" property of the element
I want to save (string xmlNode2).
- Do a text search and replace of the string xmlNode1 with the string xmlNode2.
Which is very ugly and goes against XML usage.
Unless I write my own parsing in SAX which is very troublesome since I have many different xml files.
I would be very surprised to be the first to have this problem.
Please help.
Thanks,
Julien.
Julien Mazloum
|
|
|
|
|
create a new xml object instane, and a the node you want to save
from that instance with the ->appendChild() method.You should be able to do it.
|
|
|
|
|
Thanks but it is not really what I want because, to create a new xml object instance I would need to reload the file.
I want to have a way to do an update of a node WITHOUT reloading the whole XML file.
Thanks,
Julien.
|
|
|
|
|
I have to make a Software which collects schedule information from any source on the web and to save this in a common format by using XML.
can some one please give me some tips on what the heck might be a "common format!!" and where is the best place to learn about this "Collection and saving thing" on the web...please help as I need this for my course work...
thanks....
J.
|
|
|
|
|
|
I am not sure, but could "common format" mean that you have to use your own format, but keep it same for every web source? I don't know exactly what you mean, so I will not write here how to parse HTML page or so, cuz it maybe isn't what you mean...
As soon as you make more clear what you want to do, I can tell u more.
Sorry for this beeing very "helpful", but as soon as you will explain what exactly you want to do, i'll be more exact, too.
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
The aim of this project is firstly to collect schedule information for TV or Radio or both (Radio listing is explicitly required by the client) from any source on the web; so it’s very important for this software to be flexible and sophisticated enough for it to be able to go and search for the required listings, and to select them from the midst of other unwanted information, then to save this in a common format (i.e. a format which works on most platforms) ; By using XML(Extensible Mark up Language).
Extra features that can be added which are not required by the client but can be a bonus and more pleasing for him can be to search for specific topics or presentation in a user defined format (whatever suites the client); and this may be implemented by using some sort of algorithm which can defines the subject and then match it against web resources (listing).
|
|
|
|
|
hi,
huh this is quite difficult task, I think. I can only give u some of my ideas. It is hard to collect information form any source, since they may vary in format. Most of schedule information for TV&radio will be probably stored in a table. Unfortunately, most of web is written very bad. Very probably there will by some "syntax errors" like unclosed <tr>, unquoted attributes, etc. So it is not good idea try to read it as XML. My strategy would be use of RegEx (is ur project in .NET, isn't it?). Then you can check table (or tables) wheater they contain some keywords (like time information) to make sure you are collecting information from schedule and not from navigation menu I would not implement searching myself, rather use some Google hacks ( get relevant links from google search hidden from user). I am very interested in automated collecting information from web, NLP, artificial intelligence, etc. Unfortunately I am very beginner in these fields... With known format of schedule information, ideas above should be enough. For any source (=> unknown format) it's much more complicated. Anyway, I am interested in ur project and I would be pleased to know more about it...
best regards,
David
(hopefully I hepled a litte)
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Dear CPians,
I get an XML documents using the GetXML method of the DataSet object. I use an XSLT file which is stored on the file system to transform the XML. During the transformation though, I need to inject some data from another XML fle which is on the file system.
I know that I have to use the XmlResolver object to resolve external sources. Is there an example of how I include the external data and how will I instruct the XmlResolver object to process the data?
Thank you.
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
Hi
I am using XML serializationn in C#. I have code like this.
public class Doc
{
[XmlArrayItem (ElementName="TNArray",
Type=typeof(ReTN[]))]
public object[] Obj;
}
[XmlRoot("TNA")]
public class ReTN
{something...}
Here I am trying to set XML node as "TNA" instead of class name "ReTN". [XmlRoot("TNA")] works when I serialize single object, that means when I say [XmlElement(Type=typeof(ReTN))]. In single object case I am getting node name as "TNA". If I serialize array of objects as I was doing above it gives class name("ReTN") as node name. Any thoughts.
Any help is greatly appreciated.
Thanks
Raj
|
|
|
|
|
Hello,
I am trying the following code with MS-SOAP Toolkit v3.0:
Dim oConnector As New HttpConnector30
Dim oSerializer As New SoapSerializer30
Dim oReader As New SoapReader30
oConnector.Property("EndPointURL") = "https://172.16.1.95/Service1.asmx"
oConnector.Property("WinHTTPAuthScheme") = 8
oConnector.Property("UseSSL") = True
oConnector.Property("SSLClientCertificateName") = "CURRENT_USER\MY\Nirav"
oConnector.Connect
oConnector.Property("SoapAction") = "https://172.16.1.95/HelloWorld"
oConnector.BeginMessage
... ' serializing the SOAP message here
oConnector.EndMessage ' Gives the ERROR here!
But even though the same works perfectly with "http://", it is giving the following error with "https://" -
-------------------------------------------------------
Runtime error '5400'
Connector: SSL certificate common name (host name field) is incorrect HRESULT=0x800A1529 - Connector: Unspecified HTTP error. HRESULT=0x800A1518 -------------------------------------------------------
Since the same service works fine if I invoke it from my IE6, I suppose the certificate should be fine. But this is something mysterious, and no material about this error...
Am I doing something wrong? Please suggest me a solution for this...
Thanks a lot!
Rgds,
Nirav
* Artificial intelligence is no match for natural stupidity! *
|
|
|
|
|
You resolve the problem? I am with the same problem
|
|
|
|
|
I have the following expression in in my xslt stylesheet /Products/DTA[name] to match only those nodes that have a name node as a child. This works if I use the selectNodes function of the XmlDocument in ASP.NET but not when its in the xslt document.
Can anyone shed any light on this?
Thanks
SuzyB
If I had a better memory I would remember more.
|
|
|
|
|
you have to use <xsl:value-of select="Products/DTA/name">
if you want test for its existence and select
<xsl:if test="string-length(Products/DTA/name)>0">
<node name="">
<xsl:value-of select="Products/DTA/name">
|
|
|
|
|
You have to use
<xsl:value-of select="Products/DTA/name"/>
If you like test for the existence of the node
<xsl:if test="string-length(Products/DTA/name)>0">
<xsl:value-of select="Products/DTA/name"/>
</xsl:if>
Raj
|
|
|
|
|
You have to use
<xsl:value-of select="Products/DTA/name"/>
If you like test for the existence of the node
<xsl:if test="string-length(Products/DTA/name)>0">
<xsl:value-of select="Products/DTA/name"/>
</xsl:if>
Raj
|
|
|
|
|
Hi,
I have some XML generated on fly. I only know the names of elements. The attributes in those elements can have different names in different scenarios. Even the number of attributes in those elements may differ.
Can i write a single XSLT to convert these dynamically generated XML into my desired format ??
Note: I do know at design time the name of elements, but i don't know the name of attributes and number of attributes in the element.
This could be done in programming languages by looping through all the attributes. Can this be done in XSLT ??
Thanks in advannce,
Hatim Ali.
|
|
|
|
|
Hi,
I have an element defined in a schema of type date, I was wondering if there was, and if so how, I could simply store a year in this element.
For example I would simple like the element to appear like so:
<realization>1970</realization>
When I run this throught XMLSpy it throws the error "Value out of range for datatype date".
The scheme entry is
<element name="realization" type="date">...</element>
Cheers
Andy
|
|
|
|
|
I was wondering if anyone has created formulas with a Microsoft Excel XSL template.
Here is my problem: I am trying to automatically sum several columns, but I don't know if ss:Formula is the right way to go or if I should use a xsl variable.
Here's a snip from my stylesheet:
<code>
<xsl:for-each select="./ItemDetail">
<ss:Cell ss:StyleID="ColumnData">
<ss:Data ss:Type="Number">
<xsl:value-of select="Quantity"/>
</ss:Data>
</ss:Cell>
</xsl:for-each>
<ss:Cell ss:StyleID="ColumnData">
<ss:Data ss:Type="Number">
<xsl:value-of select="ItemDetail/Price"/>
</ss:Data>
</ss:Cell>
</code>
The price is the same but the description of each item will be different. Any suggestions or examples of this type of thing would be very helpful!
Thanks!
|
|
|
|
|
I am trying to get a url with MSXML2.ServerXMLHTTP but turkish chacters in the url making problem that they seem as '?' how could I solve this problem.
Here is the my code....
<%<br />
Response.Buffer = true<br />
<br />
Dim objXMLHTTP, xml, text<br />
<br />
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")<br />
<br />
xml.Open "GET", "http://www.bektekeri.com/include/articles/article14.php", false<br />
xml.setRequestHeader "Content-Type", "xml/text"<br />
xml.setRequestHeader "characterset","windows-1254"<br />
xml.setOption(0) = 1524<br />
xml.Send<br />
<br />
text = xml.responsetext<br />
response.Write text<br />
<br />
Set xml = Nothing<br />
<br />
%> <br />
karanba
|
|
|
|
|
I'm posting this question all over the place, so forgive me if you've already seen it--
There doesn't seem to be much information about how to handle generics in XAML. I found this[^] blog entry, and the discussion is quite interesting.
As the discussion points out, generics are useful for things other than collections. This is particularly pertinent to MyXaml because declarative programming is not limited to just UI controls. I also feel that the syntax should be XML compliant.
Any thoughts about this suggested format?
<SomeGenericControl(SomeObjectType1.SubType1, SomeObjectType2.SubType2)/>
I don't like the above syntax because it isn't xml compliant, with the '(' in the tag.
How about this format suggested by Chris Hollander:
<BindableList Generic:Types="CheckBox, Button" DataSource="..." />
My preference is the “generic:types=” syntax, as I find it more readable.
Suggestions?
Marc
MyXaml
Advanced Unit Testing
|
|
|
|
|
Hi Guys,
I am relatively new to XML and it's associated technologies and was looking for some help / advice.
We have a bunch of classes that are arranged into a hierarchy and we now want to represent these classes in XML. Its just so happens that there is already a standard for encoding the object which my classes represent into XML. This encoding is represented in a set XML Schemas. XML schemas is something before today I knew very little about, so I have spent that afternoon reading up on them. Now I have an understanding of what they are and what they do / represent. What I need now is some direction on how to accomplish the task in hand.
What I am asking for is some help / advice on how I should now go about using the schemas to create some XML.
It does look very much like the XML elements and my classes could be one in the same, so it is very tempting to add a "GetXML" function to my classes. I am reluctant to do this as I am trying to keep my classes very light weight and loosely coupled to other classes.
Should I therefore create a set of classes based on the elements in the schema, and these objects get constructed from my current set of classes, and these new classes have the "GetXML" function.
It does sound like I am almost answering my own question, and it is sounding less and less like an XML question and more of a structural question. But I would be very interested in any feed back from anybody who has faced and solved similar problems when dealing with encoding objects to XML.
Cheers
AndyC
|
|
|
|
|
Representing classes in xml. hmmm.
Shameless plug here, but it sounds like what you're looking for is MyXaml (see sig).
Marc
MyXaml
Advanced Unit Testing
|
|
|
|