|
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
|
|
|
|
|
I want to load xml file data into a tree view in .NET using DOM. The thing is that if there are multiple "book" nodes in the xml file. xml tree shows only one instance of "book". If one book node in xml file contains a child node say "publisher" which the other book node doesn't contain, the tree view still show the "publisher" node. You can say that tree view should show the union of all the child nodes for the element "book". The way stylus does or the way xmlspy does. Any solution??
@!$h@
|
|
|
|
|
One solution is to transform the original document into your desired format through xslt first.
|
|
|
|
|
|
I need to consume a web service that was not developed in .NET. This makes it difficult because the author does not supply a WSDL document. Without the WSDL, I can't generate the proxy needed to connect and use the web service.
I am assuming the way to get this done is to generate my own WSDL. Does anyone know how to go about this or have any idea where to even start on something like this?
Thanks in advance....
-Scott
|
|
|
|
|
|
hi,
Microsoft eXentsible Application Markup Language.
In which manner it keep difference from XmL.
Only tag or scripting(xaml scripting).
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
I have a VB.NET application that is using an XmlDataDocument to store data in, this is created using an xml schema and the xml looks something like this:
<?xml version="1.0" standalone="yes"?>
<Root xmlns="http://tempuri.org/XXX.xsd">
<Node1>
Elements...
The problem is that I need to transform this using an xsl document, to get a formatted html page of the data. To do this I have to add a reference to the xsl document in the xml and remove the schema reference for the transformation to work.
The end result I need to change the xml to is:
<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type='text/xsl' href='XXX.xsl'?>
<Root>
<Node1>
Elements...
I can add the xsl reference by adding a processing instruction to the XmlDataDocument, but I can't find a way of removing the NamespaceURI from the root node.
I have also tried creating a new XmlDoc, manually creating the declaration, processing instruction and root node without the xsd reference, then copying the inner xml from the original doc root node to the new root node. The problem here is that the xsd reference is then added to every child node.
Or am I missing something, is there a way to transform the XmlDataDocument using the xsl without removing the xsd reference.
Any advice on how to clear the NamespaceURI would be appreciated.
Regards
Jason
|
|
|
|
|
TeleMessage Multi-Alert API
XML API to enable automated notifications to multiple communication devices. Send and receive interactive messages to: SMS, Mobile and Landline phone calls, Faxes and Emails.
Track message delivery and deliver real-time automated transactions.
Automating business processes could substantially reduce costs and increase efficiency.
For more information and sample scripts visit http://xml.telemessage.com/multialert
|
|
|
|
|
I would like to create some dynamic help for a DLL I have written. I know that I need to create the XML file and plonk it in some directory, and I know what tags to use within the XML file, only problem is I can't seem to get it to display when my DLL project is selected.
this is what I have so far, please help if u can
<?xml version="1.0" encoding="utf-8"?>
<DynamicHelp xmlns="http://msdn.microsoft.com/vsdata/xsd/vsdh.xsd" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:schemaLocation="http://msdn.microsoft.com/vsdata/xsd/vsdh.xsd vsdh.xsd">
<LinkGroup ID="TierXHelp" Title="TierX Help" Priority="600">
<Glyph Expanded="vs:/ctxhelp_opn.gif" Collapsed="vs:/ctxhelp_cls.gif"/>
</LinkGroup>
<Context>
<Keywords>
<KItem Name="VS.SolutionExplorer"/>
<KItem Name="VS.TextEditor"/>
</Keywords>
<Attributes>
<AItem Name="Product" Value="C#"/>
</Attributes>
<Links>
<LItem URL="c:\TierX.htm" LinkGroup="TierXHelp">Sample TierX Help Page</LItem>
</Links>
</Context>
</DynamicHelp>
Christo Van Niekerk
(South Africa)
|
|
|
|
|
Hello,I am trying to create <xsl:value-of select="....."> element(... means any string value) in a XML document.I used xmldocument.createElement("xsl:value-of select=\".... "); command.But it is not correct.how can I create xsl instructions in xml document with this method?Or should I try another way?Please help
|
|
|
|
|
1) create element takes an element name, not attributes as well xmldocument.createElement("value-of")
2) you need to create and associate a namespace for the document for xsl to the xsl uri
3) when you do 1) above, pass 2) as the second parameter
4) you need to call setattibute on the element create to add the select.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hello buddies,
Can you guid me thru sending a file to Webservice so it can save it somewhere on the server?
Thank you so much
- Den 2 fly
---
"Art happens when you least expect it."
|
|
|
|
|
If the file u r refering is in xml u can use xmlnode /
xmldocument else u can send as an array of bytes
and create the file on the server.
cool man
|
|
|
|
|
hi!
why does the code below not work -
IXMLDOMDocument * iXMLDoc;
VARIANT_BOOL bSuccess=false;
if (!PyArg_ParseTuple(args, "s", &command))
return NULL;
// specify xml file name
//iXMLDoc->loadXML(command);
iXMLDoc->loadXML(command,&bSuccess);
the error i get is
C:\hons\pocketpc\testXML2\testXML2.c(12) : error C2065: 'false' : undeclared identifier
C:\hons\pocketpc\testXML2\testXML2.c(20) : error C2039: 'IXMLDOMDocument_loadXML' : is not a member of 'IXMLDOMDocument'
C:\Windows CE Tools\wce300\Pocket PC 2002\include\msxml.h(2230) : see declaration of 'IXMLDOMDocument'
thanks
cheers
|
|
|
|