how to Add Header and Footer in word Document through XML and XSL in Asp.net? - asp.net

I want to create a word document (.doc). I have a xml file and a xslt file. The first one has the data the second has the style. Then I combine these two through my c# code and create the doc file. Can you please help me into solving the below issues concerning the xslt? how can I define in each page’s header and footer for word document.It should display in each page.

Reverse engineer it.... Make a document with both of your desired headers/footers and then see how the document generates the two items. I'll be glad to help if a can. This answer is just a quick recommendation.

Related

Display FORMATTED XML

I am retrieving an XML document from a web service (UPS actually), and I can pull the information I need from the XML, but I can't get the XML to display in the XML format. I can get it to display in a label and literal, but its all ran together. The nodes aren't displaying. The nodes display in a text box control, but it still runs together (no brks)
Any idea how to take the XML document that i get from the service and display it just like it would if you open up an XML doc in IE?
Thanks
BTW... i have search all day for this and the only thing i could find is if i was displaying a static file, which i'm not. I also tried doing the stringbuilder/stringwriter, but no luck. I'm still pretty new at this stuff so i could be missing something.
HELP... PLEASE!
Try encompassing the XML in the
<pre>... your xml</pre>
tags.

How to disable header on frontpage of rst2pdf document?

I am generating some PDF's and I would like to disable the header on the frontpage. I know there are built-in templates in rst2pdf and one template is called coverPage but I don't seem to be able to get it to work.
The manual is saying you should use a
..raw:: pdf
PageBreak coverPage
statement but that will insert a empty before the coverpage, so how can I have a coverpage without a header and without using the oddeven directive (I want to use the same header on all remaining pages).
Thanks for your suggestions!
That's how you change the stylesheet after the cover page. You'll need to create a custom stylesheet that specifies what is the format of the first page and then change the style for the rest of document. Have a look at chapter 15 of the manual.
Note: current accepted answer contains broken link (linked website has gone).
The correct answer is simple:
1) In you style-file define:
pageSetup:
firstTemplate: coverPage
2) Then in your template, when you want to start using header/footer add:
..raw:: pdf
PageBreak cutePage
Make sure cutePage has set header/footer to true.

seam-gen and flex

I have integrated seam and flex with FlamingoDS
I got html file from mxml file and I stored it in WebContent folder it's fine
then I want to create link named as 'Plan' in menu.xhtml
My aim is to get that html file when i clicked on this button I don't know what to do for that
so, I have created some test.xhtml in that top element is the
for the template attribute this element I have given the template.html
and I used
then for 'Plan' link I gave the view="/test.xhtml"
It's fine when I clicked on that link I am getting the test.seam file which includes our html file but this html file is coming in some fixed area with scroll bars only eventhough there is a lot of space to fit
Please help...... me
First of all, it is very difficult to read your post. Please format it more readable.
Secondly, we can only guess what's wrong when we cannot see any code. But my hunch is that you are using s:decorate that includes some formating you are not aware of. This comes in standard seam-gen. Try removing that s:decorate stuff or point to another style you wish to use.

How to display XSL-transformed XML in ASP.NET page?

So far all the XML / XSLT I've worked with takes an XML document and transforms it to a standalone HTML webpage using an XSLT file.
In my web application, I'm using a web service to retrieve the XML document, which I need to render and make human-readable, and then insert that formatted content into a content placeholder in my master page.
The easiest way would be to append the XSLT to the retrieved XML file and link that to the content placeholder, but something tells me I can't just do that.
I took a look at these Stack Overflow pages, but they just want to render the straight XML whereas I want a transformed XML. Also, I need to be able to put it into my master page template.
This article shows how:
http://www.codeproject.com/Articles/37868/Beginners-Introduction-To-XSL-Transform-Rendering-XML-Data-using-XSL-Get-HTML-output.aspx
even if the spelling is as bad as mine...
Added
And here's another link that shows how, perhaps a bit more simply
http://www.aspfree.com/c/a/XML/Applying-XSLT-to-XML-Using-ASP.NET/2/

Are there any tools out there to compare the structure of 2 web pages?

I receive HTML pages from our creative team, and then use those to build aspx pages. One challenge I frequently face is getting the HTML I spit out to match theirs exactly. I almost always end up screwing up the nesting of <div>s between my page and the master pages.
Does anyone know of a tool that will help in this situation -- something that will compare 2 pages and output the structural differences? I can't use a standard diff tool, because IDs change from what I receive from creative, text replaces lorem ipsum, etc..
You can use HTMLTidy to convert the HTML to well-formed XML so you can use XML Diff, as Gulzar suggested.
tidy -asxml index.html
If out output XML compliant HTML. Or at least translate your HTML product into XML compliancy, you at least could then XSL your output to remove the content and id tags. Apply the same transformation to their html, and then compare.
I was thinking on lines of XML Diff since HTML can be represented as an XML Document.
The challenge with HTML is that it might not be always well formed. Found one more here showing how to use XMLDiff class.
A copy of my own answer from here.
What about DaisyDiff (Java and PHP vesions available).
Following features are really nice:
Works with badly formed HTML that can be found "in the wild".
The diffing is more specialized in HTML than XML tree differs. Changing part of a text node will not cause the entire node to be changed.
In addition to the default visual diff, HTML source can be diffed coherently.
Provides easy to understand descriptions of the changes.
The default GUI allows easy browsing of the modifications through keyboard shortcuts and links.
winmerge is a good visual diff program

Resources