|
Don't be rude. If you were interested in helping him you could have posted the URL to the article. If not, you could just told him there was an article on CP.
|
|
|
|
|
Paul Wolfensberger wrote:
Don't be rude
Be more positive. How about saying: "Be nice!". Reinforce the behaviour you wish, rather than the behaviour you don't want.
Paul Wolfensberger wrote:
If you were interested in helping him you could have posted the URL to the article
If you give a man a fish, you feed him for a day. If you teach a man to fish, you feed him for a lifetime.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
|
|
|
|
|
i was able to generate html doc/code from xml and xsl through c++ using IXMLDOMDocumentPtr , IXSLTemplatePtr , IXSLProcessorPtr .
but when i added/wrote schema for xml , it was skipping tag elements text
in xml file.
how can i get/access tag elements text ?
|
|
|
|
|
Is it possible to define schema for the following element ? :
<processor>
<param>arial</param>
<param>3.5</param>
<param>50</param>
<param>95</param>
<param>some text</param>
</processor>
I want to enforce that exactly five 'param' elements can be specified, and I want
to enforce types for the elements (i.e. first element is xs:string, seconf xs:double,
... etc
I tried to create the following schema, but I get error when checking for validity
<xs:complexType name="processor_type">
<xs:sequence>
<xs:element name="param" type="xs:string"></xs:element>
<xs:element name="param" type="xs:double"></xs:element>
<xs:element name="param" type="xs:decimal"></xs:element>
<xs:element name="param" type="xs:decimal"></xs:element>
<xs:element name="param" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
Error:
In the same scope, elements with the same name have to have the same type.
Is there any workaround for this, but without giving different names for current 'param'
elements
Thanks
Michał Januszczyk
|
|
|
|
|
Hi
I want to print an Organisation Chart which is more like an Inverted Tree Structure.
Like that with proper Lines. I could find ready tools for Explorer Type of Tree Structure (similar to windows Explorer). But i want an inverted tree structure like above one.
Actually I am doing my work in ASP. But any solution is accepted.
Thanks
|
|
|
|
|
Have a look here http://www.15seconds.com/issue/020424.htm or http://www.15seconds.com/focus/XML.htm for more solution.
Goodluck
|
|
|
|
|
Is there any way that this can be presented in a horizantal way
|
|
|
|
|
I am trying to write a stylesheet to extract information from an XML Schema. However, I cannot figure out how to handle the namespace in the source XML/XSD document. Do you have to declare the namespace in the XSL stylesheet as well? What about in the XPath expressions in the XSL? Do you have to use the namepsaces there as well?
Thanks
|
|
|
|
|
Hello,
I'm new to xslt and xml. I have a xml-document that looks like this :
<?xml version="1.0" standalone="yes"?>
<sessions version="1.0">
<session name="Development">
<libraries>
<library name="contxtlib">
<fullname>123</fullname>
<super>true</super>
<loadorder>8</loadorder>
</library>
<library name="xmllib">
<fullname>xmllib.p</fullname>
<super>true</super>
<loadorder>12</loadorder>
</library>
<library name="clientdebuglib">
<fullname>clientdebuglib.p</fullname>
<super>true</super>
<loadorder>3</loadorder>
</library>
</libraries>
</session>
</sessions>
Now i want to sort this xml-file. The loadorder should be 3 then 8 and then 12 and not in this order. So it has to be sorted. I tried writing a xslt file but he doesn't sort my data.
My xslt file looks like this:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="session">
<xsl:copy>
<xsl:apply-templates>
<xsl:sort data-type="number" select="session/libraries/library/loadorder"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Everything could be wrong for me, i found this on the internet and made some changes but now i don't know whether it's good. All i want to to is sort the library's on loadorder.
thx a lot in advance
|
|
|
|
|
your first template match is wrong it should be "sessions" rather than "session"
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hai,
I have been able to develop database applications using Recordsets technology. I worry is that this approach is a bit cumbersome for large database applications.
I want to use an approache were I will be able to access a single or set of records directly from a Database without having to search in the resulting recordset.
In short I want to be able to use SQL in my database programs in VC++.
How should I connect to the database. What specific coding and setup is needed.
Lloyd.
|
|
|
|
|
Hai,
I'am a new VC++ developer, I have been able to develop applications using
MFC Single/Mutiple Doments and manipulating recordsets.
I want to access records in a database using Dialogue Boxes instead of document forms. I do not like the appearance of a Document based database apllication.
What procedures should I follow to be able to access a database using Dialogue Boxes.
Lloyd.(Zambia)
|
|
|
|
|
Hello. I have tried to build my project which references msxml4.dll but when I try to build it I get the following error:
Cannot open type library file: 'msxml4.dll'
I can manage to find this on the Internet I think but should I just put it somewhere in my path or is there a proper way of installing it along with maybe an SDK? I have tried installing the Internet SDK but it does not install the file I want. I have tried searchig for it on my hard disk after installing the SDK but it is not there.
Thank you for any help.
|
|
|
|
|
Hi,
Here is the link to MS for the msxml4 install.
Are you using it from VC or VB ?
The msxml4.dll should end up in the System32 directory of your system.
Hope this helps,
Andy
|
|
|
|
|
Hi Everyone,
I'm new to this forum and I have quite a probleem here!!! Iam
looking for an XSL or even Java Script that will allows me to view a table in a normal
view and an extended view. See here below..
|Table (Go to Extended View)|
_______________________________________________________________
Thing |property| |Extra stuff|
_____ |________|______|___________|__________________________
blabla |blabla |blabl | blabla |blabla
________|________|______|___________|___________________________
This is an example of the table, when you click the extended view
link you can view the extended view and vice versa here below….
Table (Back to Normal View)
_______________________________________________________________
Thing |property| |Extra stuff|Extra column
_____ |________|______|___________|__________________________
blabla |blabla |blabl | blabla |Extra blabla
________|________|______|___________|___________________________
ExtraRow|blabla |blabl | blabla |Extra blabla
________|________|______|___________|___________________________
ExtraRow|blabla |blabla|blablblabla|Extra blabla
________|________|______|___________|___________________________
Does anyone have anything like this? It has given me nuch headache
|
|
|
|
|
Hi Everyone,
I solve the problem by letting Microsoft's new software InfoPath generate it for me... It looks very complicated but it works.. I think Microsoft has just taken away the fun in writing XSLT scripts... very powerfull tool.. that Infopath...generates the xsd, xsl, xslt, jscript name it.....and saves a lot of time.
Thanks,
|
|
|
|
|
hi my dear
i use xslt template to transform xml content to html file.
but i have some problem ,that is the inner text of P tag in generated html file(p tag is contained with a cell of an absolute table) don't wrap
automatically!and it cause to resize the container table and when
i open that html file in VS .NET environment and changes any thing likee a tag property the text of p tag becomes true!
even i used nowrap property of p tag to false but it didn't work!
how i can fix this bug in my product?
thanks a lot
hassan azizi
|
|
|
|
|
hi my dear
i use xslt template to transform xml content to html file.
but i have some problem ,that is the inner text of P tag in generated html file(p tag is contained with a cell of an absolute table) don't wrap
automatically!and it cause to resize the container table and when
i open that html file in VS .NET environment and changes any thing likee a tag property the text of p tag becomes true!
even i used nowrap property of p tag to false but it didn't work!
how i can fix this bug in my product?
html sample:
....
<table style=" POSITION: absolute; top:147; left:173" width="398" height="292" bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="0">
<tr width="100%">
<td width="100%" dir="ltr">
<p align="left">
<font face="Tahoma" color="#000000" style="font-size:8pt">aaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaa ddddddddddd dddddddddd dddddddddddddd dddddddddddddd dddddddddddddd dddddddddd sssssssssss sssssssssssssssssssssssssssssssss </font>
</p>
</td>
</tr>
</table>
.....
problem : the text in p tag don't wrap!
xslt partial template:
....
<font face="{$font}" color="{$color}" style="font-size:{$size}pt">
<xsl:call-template name="InnerText">
<xsl:with-param name="text" select="translate(.,' ',' ')" />
</xsl:call-template>
</font>
.....
thanks a lot
hassan azizi
|
|
|
|
|
I am doing a simple task where I am trying to create a table of cars with co
lumn headers such as model, make, color etc and then have details of the dif
ferent cars underneath ..... and I have to create a dtd, xml and xls file fo
r them. I have tried entering one set of data for a Mercedes car but the dat
a just all comes out together on one line and doesn't create the table as I
had hoped! My output looks like this:
Cars for Sale
makemodelyearcolorengineradioair conditioningpower windowspower steeringpowe
r brakes1Mercedes BenzE2402003Black8fuel_injected yes yes yes yes yes
Any help MUCH appreciated. Thanks
Here is my code:
cars_for_sale.DTD:
<?xml version="1.0"?>
<!ELEMENT cars (car+)>
<!ELEMENT car (make, model, year, color, engine, number_of_doors, transmissi
on_type, accessories*)>
<!ELEMENT engine (number_of_cylinders+, fuel_system)>
<!ELEMENT make (#PCDATA)>
<!ELEMENT model (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT color (#PCDATA)>
<!ELEMENT number_of_doors (#PCDATA)>
<!ELEMENT transmission_type (#PCDATA)>
<!ELEMENT accessories (#PCDATA)>
<!ELEMENT number_of_cylinders (#PCDATA)>
<!ELEMENT fuel_system (#PCDATA)>
<!ATTLIST accessories radio CDATA #REQUIRED>
<!ATTLIST accessories air_conditioning CDATA #REQUIRED>
<!ATTLIST accessories power_windows CDATA #REQUIRED>
<!ATTLIST accessories power_steering CDATA #REQUIRED>
<!ATTLIST accessories power_brakes CDATA #REQUIRED>
<!ENTITY bmw "B M W">
<!ENTITY me "Mercedes Benz">
<!ENTITY fo "Ford">
<!ENTITY v "Volvo">
<!ENTITY mi "Mini">
<!ENTITY j "Jaguar">
<!ENTITY p "Peugeot">
<!ENTITY rr "Rolls Royce">
cars_for_sale.XML:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE cars_for_sale SYSTEM "cars_for_sale.dtd">
<?xml-stylesheet type="text/xsl" href="cars_for_sale.xsl"?>
<cars_for_sale>
<car id = "1">
<make>&me;</make>
<model>E240</model>
<year>2003</year>
<color>Black</color>
<engine>
<number_of_cylinders>8</number_of_cylinders>
<fuel_system>fuel_injected</fuel_system>
</engine>
<number_of_doors>5</number_of_doors>
<transmission_type>Diesel</transmission_type>
<accessories>
<radio>yes</radio>
<air_conditioning>yes</air_conditioning>
<power_windows>yes</power_windows>
<power_steering>yes</power_steering>
<power_brakes>yes</power_brakes>
</accessories>
</car>
</cars_for_sale>
cars_for_sale.XSL:
<?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 = "/">
<h1>Cars for Sale</h1>
<car border = "border">
<tr>
<th></th>
<th>make</th>
<th>model</th>
<th>year</th>
<th>color</th>
<th>engine</th>
<th>radio</th>
<th>air conditioning</th>
<th>power windows</th>
<th>power steering</th>
<th>power brakes</th>
</tr>
<xsl:for-each select = "cars_for_sale/car">
<tr>
<th><xsl:value-of select = "@id" /></th>
<td><xsl:value-of select = "make" /></td>
<td><xsl:value-of select = "model" /></td>
<td><xsl:value-of select = "year"/></td>
<td><xsl:value-of select = "color"/></td>
<td><xsl:value-of select = "engine/number_of_cylinders"/></td>
<td><xsl:value-of select = "engine/fuel_system"/></td>
<td><xsl:value-of select = "accessories"/></td>
</tr>
</xsl:for-each>
</car>
</xsl:template>
</xsl:stylesheet>
|
|
|
|
|
I'm assuming that you are trying to write out a html table.
If you are then you need to output a table tag as well as the rows and cells.
|
|
|
|
|
I'm building an application, using C# and SQL 2000, where based on the user identity I wish to present different views of data and XSLT is an ideal solution for this application. If when I call the Load method of XslTransform I reference an on-disk file everything works as expected.
XslTransform transform = new XslTransform ();
transform.Load (@"D:\WorkDir\test.xslt");
However, I want to store different XSLT's in the database and retrieve it based upon the user's identity. (Interesting enough I could find no sample code anywhere that did this, although I would think it would be fairly common).
When I try to read back the XSLT from SQL - if I do not put in a FOR XML I cannot load the result into an XmlReader class. I get an exception of:
"Invalid command sent to ExecuteXmlReader. The command must return an Xml result."
Putting in a FOR XML AUTO or RAW allows it to load the reader, but the transform.Load subsequently fails with:
"Missing mandatory attribute 'version'."
although there is a version tag in my XSLT.
sqlConn.Open ();
SqlCommand sqlCommandXSL = new SqlCommand ("sp_GetUserTransform 0", sqlConn);
XmlTextReader xmlReadTransform = (XmlTextReader) sqlCommandXSL.ExecuteXmlReader ();
XPathDocument doc = new XPathDocument(xmlReadTransform, XmlSpace.Preserve);
XPathNavigator xpn = doc.CreateNavigator ();
XslTransform xslTransform = new XslTransform ();
xslTransform.Load (xpn, null, null); <-- throws exception here.
I'd appreciate any insights as to what I'm doing incorrectly and links to samples that show how to do this.
Thanks.
|
|
|
|
|
I am using the classes and methods from the Msxml2.DOMDocument.4.0 namespace to dynamically create an XML file using VBScript. (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/xml_mth_sz_3jol.asp). I was able to successfully create the XML and load it into memory for parsing. However, for some reason, I am not able to use the SelectSingleNode() method of the IXMLDOMNode object. The error I get is: "Object doesnt support this property or method. Error code: 800A01B6".
Any ideas?
|
|
|
|
|
hi
I try to send data as xml bitween client/server
help me i don`t need to enconing it byte`s
thank you
|
|
|
|
|
Erm, what language / platform / protocol are you using?
Ryan
|
|
|
|
|
1- thank you
2- language c# ,platform 2003 server ,protocol ip
hmd.....
|
|
|
|