|
Links to xsl and sample screen shot [^][^]
|
|
|
|
|
Hi,
I have recently been thrown in the deep end with XML programming and need help. I am developing a web-site for my ISP and need to intergrate the XML functionality my down-stream provider has. At the moment I am able to send a request and get a response ok but I can't for the life of me figure out how to parse the response:
<form method="post" action="https://www.downstreamserver/xmlrequest.php" >
<%Response.Write("<input type=""hidden"" name=""xmlrequest"" value=""" & strXML & """>")%>
<input type="submit" name="submit" value="submit">
</form>
When the Submit button is pressed I get an XML page from the server which is being displayed in my browser. I want to use the information in the XML and place into a table on the page. I apologise for being such a newbie but I really need help with this.
James Boag. Genius
|
|
|
|
|
It took me a while but I figured it out. Had to use a combination of Web Request and XMLTextReader (See MSDN).
James Boag. Genius
|
|
|
|
|
Hi all,
I'm trying to use the xsd.exe to generate some c# classes. I don't have a problem with creating the classes, however, they are all generated in the same file. My question is, can I set the tool so that it creates these classes in separate .cs files or is there another freely available tool that can do the same thing.
thanks in advance guys.
rich
|
|
|
|
|
... or is there a tool around that will parse the .cs file for classes and create separate files. I don't how easy it is to do this but wouldn't feel conficent of doing it mysel.
|
|
|
|
|
I have an XML file which will contain the color of Table Cell.. i-e Blue,Green,Red depending upon the values. Is there any way to assign back-ground color of cell from these vales ????
I have tried variable and direct but in vain.the error comes when I write this
'@AIV = Variable which contains red,green or yellow
<fo:table-cell background-color="@AIV">
or
<fo:table-cell background-color='<xsl:value-of select="@AIV" />'>
Any Solution would be highly appreciated
-- modified at 6:58 Wednesday 26th July, 2006
|
|
|
|
|
The problem is that I do not have any files. The XML I have stored in a variable (string or XmlDocument). And the second problem is that I need to return string that contains HTML.
|
|
|
|
|
|
I don't know how to do this in C#.
|
|
|
|
|
Don't know how to do what? You say you've got an XML stored in a string or an XmlDocument and you want to transform it to HTML. Do you have a stylesheet? Do you have to parse it with C# code? Do you have to handle both strings and XmlDocuments? Have you written any code yet? What does it do?
In order for someone to be able to help you, you have to explicitly spell out what you need help on. We can't read your mind.
Logifusion[^]
|
|
|
|
|
Ok, I have to build function in C# with next functionality:
1. The function must get two parameters: first is a string that holds xml, second is a string that holds a path to the XLS file.
2. The function must transform XML to HTML (according to XLS) and return it as a string.
That's all!
|
|
|
|
|
Use System.Xml.Xsl.XslCompiledTransform :
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load("output.xsl");
That loads the XSL. Now you have to perform the transformation using the Transform method. You'll have to pass it an XmlReader and XmlWriter since you start and end with a string.
XmlReader xr = new XmlReader(new StringReader(myInputString));
StringBuilder sb = new StringBuilder();
XmlTextWriter xtw = new XmlTextWriter(new StringWriter(sb));
xslt.Transform(xr, xtw);
return sb.ToString();
Logifusion[^]
|
|
|
|
|
Thank you very much!
P.S.
I changed
XmlReader xr = new XmlReader(new StringReader(myInputString));
to
XmlReader xr = XmlReader.Create(new StringReader(myInputString));
And thank you again!
|
|
|
|
|
Hi all,
about USMT and explain how it works?
Please let me know how to start, how to program an USMT (User State Migration Tool)
-- modified at 7:11 Tuesday 25th July, 2006
|
|
|
|
|
Hi All,
i want to create a page sequence for every page that has a table on it to minimize the memory consumption of fop...
i want it to look like this:
[-------------------------Heading--------------------------]
[--------------------------Date----------------------------]
<This is where the page sequence should start>
ClientName-------ClientSurname
Jan--------------Smit
Piet-------------Poggenpoel
Gert-------------Koekemoer
Jaun-------------Du Randt
Sandra-----------Smith
Sam--------------Watkens
James------------Small
James------------Dalton
Peter------------Edison
Hennie-----------Hannekom
Werner-----------Pienaar
Frik-------------Delport
Mariska----------de Lange
Sam--------------de Lange
<This is where i want the page sequence to stop>
<Now The Start of a new page sequence>
ClientName-------ClientSurname
Jan--------------Venter
Hanno------------Britz
Jannie-----------Jobert
Sannie-----------Jobert
Wilma------------Molen
Willie-----------Pretorius
<End of the page sequence>
<div class="ForumSig">He who laughs last...</div>
|
|
|
|
|
<?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='ClientLookUpResult.xsl'?>
<ClientLookUp>
<Title>
<Heading>Client Look-Up Result</Heading>
<DateCreated>Date Created: 24 July 2006 03:56 PM</DateCreated>
</Title>
<TableEntries>
<ClientName1>Yes</ClientName1>
<ClientSur1>Yes</ClientSur1>
<TableInfo Key="0">
<ClientName>Estelle</ClientName>
<ClientSurname>Van Graan</ClientSurname>
</TableInfo>
<TableInfo Key="1">
<ClientName>Natalie</ClientName>
<ClientSurname>Liebenberg</ClientSurname>
</TableInfo>
<TableInfo Key="2">
<ClientName>Irma</ClientName>
<ClientSurname>Du Plessis</ClientSurname>
</TableInfo>
<TableInfo Key="3">
<ClientName>Sandra</ClientName>
<ClientSurname>Nortje</ClientSurname>
</TableInfo>
<TableInfo Key="4">
<ClientName>Sandra</ClientName>
<ClientSurname>Nortye</ClientSurname>
</TableInfo>
<TableInfo Key="5">
<ClientName>Kathy</ClientName>
<ClientSurname>Ferreira</ClientSurname>
</TableInfo>
<TableInfo Key="6">
<ClientName>Antionette</ClientName>
<ClientSurname>Viloene</ClientSurname>
</TableInfo>
<TableInfo Key="7">
<ClientName>Lindsay</ClientName>
<ClientSurname>Scot</ClientSurname>
</TableInfo>
<TableInfo Key="8">
<ClientName>Waynand</ClientName>
<ClientSurname>Wessels</ClientSurname>
</TableInfo>
<TableInfo Key="9">
<ClientName>Anja</ClientName>
<ClientSurname>Eggers</ClientSurname>
</TableInfo>
<TableInfo Key="10">
<ClientName>Susca</ClientName>
<ClientSurname>Watts</ClientSurname>
</TableInfo>
<TableInfo Key="11">
<ClientName>Elsabe</ClientName>
<ClientSurname>Van Zyl</ClientSurname>
</TableInfo>
<TableInfo Key="12">
<ClientName>Magriet</ClientName>
<ClientSurname>Fourie</ClientSurname>
</TableInfo>
<TableInfo Key="13">
<ClientName>Adele</ClientName>
<ClientSurname>Van Eck</ClientSurname>
</TableInfo>
<TableInfo Key="14">
<ClientName>Elna</ClientName>
<ClientSurname>Booysen</ClientSurname>
</TableInfo>
<TableInfo Key="15">
<ClientName>Claudia</ClientName>
<ClientSurname>Henkel</ClientSurname>
</TableInfo>
<TableInfo Key="16">
<ClientName>Marius</ClientName>
<ClientSurname>Barnard</ClientSurname>
</TableInfo>
<TableInfo Key="17">
<ClientName>Heilet</ClientName>
<ClientSurname>Van Zyl</ClientSurname>
</TableInfo>
<TableInfo Key="18">
<ClientName>Frances</ClientName>
<ClientSurname>Bredenkamp</ClientSurname>
</TableInfo>
<TableInfo Key="19">
<ClientName>Carol</ClientName>
<ClientSurname>Waterston</ClientSurname>
</TableInfo>
<TableInfo Key="20">
<ClientName>Carly</ClientName>
<ClientSurname>Steyn-Pillay</ClientSurname>
</TableInfo>
<TableInfo Key="21">
<ClientName>Suzann</ClientName>
<ClientSurname>Stoman</ClientSurname>
</TableInfo>
<TableInfo Key="22">
<ClientName>Brett</ClientName>
<ClientSurname>Deeve</ClientSurname>
</TableInfo>
<TableInfo Key="23">
<ClientName>Lynn-Ann</ClientName>
<ClientSurname>Fuchsloch</ClientSurname>
</TableInfo>
<TableInfo Key="24">
<ClientName>Corina</ClientName>
<ClientSurname>Koorson</ClientSurname>
</TableInfo>
<TableInfo Key="25">
<ClientName>Debbie</ClientName>
<ClientSurname>Visagie</ClientSurname>
</TableInfo>
<TableInfo Key="26">
<ClientName>Francois</ClientName>
<ClientSurname>Coetzee</ClientSurname>
</TableInfo>
</TableEntries>
</ClientLookUp>
|
|
|
|
|
So i basically need one page-sequence for each "TableEntries"
Is this possible?
He who laughs last...
|
|
|
|
|
Though you posted three messages to clear but some how I am still unclear. what my understanding is you have suppose 10 Tables on 10 different pages. in total and suppose 20 Pages of report contains tables on last 10 pages so the page number will start from 1 where table 1 will come and then it will be 2,3,4 and if there will be any page with no table it will skip that and will count the next page from the last numbered page ???
|
|
|
|
|
no, not exactly...
my whole document is one BIG table. What i want to do is split this table into smaller tables... One on each page and each page should be a "page-sequence"...
if that makes sence...
i am starting to get it right but i still need help.
If you'd like, i can post my xsl for you to show you what i've got thusfar...
He who laughs last...
|
|
|
|
|
if you look at my xml file...
each one of the tableInfo tags is a table row in my table.... hope this makes it a little more clear as to what i am after...
He who laughs last...
|
|
|
|
|
So, Lets say {for aguments sake"} i want to insert a new page-sequence after every 30 rows. I want to do this because i read that FOP release memory after every page-sequence and due to the fact that it holds onto memory when it comes to tables. Just before i close the page-sequence i want to close the table. With the new page-sequence, i want to start a new table and this new table should be on a new page.
It sounds so difficult even me who is trying to explain what i'm looking for find it hard to put into words...
So, hopefully by inserting multiple page-sequences after every so table rows, i am freeing much needed memory.
He who laughs last...
|
|
|
|
|
ok what I understand is that after each 30 rows you need a new page with table headers and offcourse page sequence... paste above this line <fo:flow flow-name="xsl-region-body">
'' Copy below this... this will add a footer which you need on every page
<fo:static-content flow-name="xsl-region-after">
<fo:table table-layout="fixed" >
<fo:table-column column-width="150mm"/>
<fo:table-column column-width="30mm"/>
<fo:table-body >
<fo:table-row>
<fo:table-cell border-top-width="0.5px" border-top-style="solid">
<fo:block font-size="6.0pt" font-family="sans-serif" padding-after="2.0pt"
text-align="left" font-weight="bold" space-before="1mm"
>Printed :Date Here</fo:block>
</fo:table-cell>
<fo:table-cell border-top-width="0.5px" border-top-style="solid">
<fo:block font-size="6.0pt" font-family="sans-serif" space-before="1mm"
text-align="end"
font-weight="bold"
>Page <fo:page-number/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
'' For Page Break you can use this
<fo:block break-before="page"></fo:block>
-- modified at 4:54 Tuesday 25th July, 2006
|
|
|
|
|
These threads have been going on for quite a while. If I were you, I would count up all the hours I just spent researching ways to get around FOP's shortcomings. Then I would estimate how much time I expect to spend solving the current problem and how much time will be wasted in the future when doing other reports. Then I would write this up in a report and include a description of how your workarounds are adding unnecessary complexity which makes it harder to maintain the stylesheets. Then, find an alternative: a commercial product that does the same thing as FOP but without the memory problems. Be careful to do your homework because even some of the commercial products have the same problem. I used Chive Apoc at one job and it worked great, plus it has an evaluation version.
Gather all of this information into a report and submit it to your manager. It is often difficult to convince managers to buy a tool especially when there are free ones available. That's why you have to convince him/her. I ran into FOP's memory problem like 4 years ago and they still haven't fixed it. If they haven't done it yet, they probably never will. Your time costs money. You have to show your manager that they will save money by buying a tool instead of having you spend tons of time coming up with creative workarounds.
Logifusion[^]
|
|
|
|
|
Thanks dustin, once again
The thing is, i'm so close, i can feel it...
this page sequence thing is looking promissing...
i almost got it just one more hick-up. My stylesheet has one more problem that i'm struggling with, then, hopfully, i wont need no patch for FOP and my memory problem will be very small. I have an example of the page sequence method but i'm stuggling to implement it. Not shure what part is doing what. You know?...
He who laughs last...
|
|
|
|
|
Well I hope you get it all solved. It's gratifying to solve difficult problems like this. But do keep in mind that ultimately someone is paying you to do a job and time you spend spinning your wheels costs them money. (Not to mention time spent surfing code project because you're uninterested in the work you're doing, but let's forget about me )
Logifusion[^]
|
|
|
|