xsl-list
[Top] [All Lists]

RE: Using xml/xsl in .net framework

2003-06-10 03:12:20
Hi Kathy

I'm no expert but I've already found that the .net libraries are great for
working directly with xml/xslt. I've mislaid the code I was going to send
but this culled from MSDN may get you going:

Dim doc as XmlDocument = new XmlDocument()
doc.Load("books.xml")
Dim transform As XslTransform = new XslTransform()
transform.Load("book.xsl")
Dim rdr As XmlReader = trans.Transform(doc, Nothing, Nothing)
while (rdr.Read())
end while

Search on 'xslTransform' and you will find examples.

On 3. I usually deal with this by combining the users choice of file.xml
(perhaps with a little dom code) with a framework xml doc and then transform
the lot to make one page of HTML output, but there are lots of ways so email
me off list if I can help. (rod(_dot_)humphris(_at_)focusdiy(_dot_)co(_dot_)uk)

Cheers

Rod

-----Original Message-----
From: Kathy Burke [mailto:Kathy_Burke(_at_)Jabil(_dot_)com]
Sent: 09 June 2003 15:49
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Using xml/xsl in .net framework


Hi all.

I am desparately seeking information/example of how to use an xml doc (using
xsl stylesheet that producing an html doc) from within .net (vb.net
specifically but that doesn't really matter)...NOT using datagrid/database
structure.

The problem is I can ONLY find examples on using xml via the datagrid
pulling from and writing to database structures.This is what I'm trying to
accomplish (vb.net BTW is mandated by others for this task). Any clues
appreciated...or please just point me in the right direction...I've been
through the obvious newsgroups, done umpteen Googles, read books...no luck.

(1) Created xml docs for work instructions...mostly <step> elements, a few
contain <measurement> elements to capture data input by the user. I'm using
xslt to select and present an html doc, including some vbscript for some
buttons created using the xsl stylesheet (such as StartTime, EndTime...to
capture system time, etc.).

(2) The user should open an aspx page, select some params from dropdown
boxes (i.e., customer, workstation, assembly) and click on Submit. This
should open the appropriate Work Instruction xml doc using those "system"
parameters and references another xml doc that specifies which doc to open.

I've figured out how to accomplish 1 and 2 (well, in theory at least), but

(3) I need to serve up the xml doc within .net and have some other features
within the same page for the users (such as look-up deviations from another
database, etc.) so I can't have the xml doc own the entire screen. This
would tell me that I somehow have to put the xml doc in a frame or
something. I need to capture any user input, and save the xml doc to a new
filename (updated each time user input occurs).

Someone PLEASE help me...

Thanks as always,

Kathy


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________


________________________________________________________________
Any opinions expressed in this email are those of the individual and not 
necessarily the Company. Unless expressly stated to the contrary, this email is 
not intended to give rise to a new, or affect an existing, contractual or other 
legal relationship.This email and any files transmitted with it, including 
replies and forwarded copies which may contain alterations) subsequently 
transmitted from the Company, are confidential and solely for the use of the 
intended recipient. The unauthorised use, disclosure or copying of this email, 
or any other information contained or attached,is prohibited and could, in 
certain circumstances, be a criminal offence.

If you have received this email in error please notify the sender as soon as 
possible.

This footnote also confirms that this email message has been swept for the 
presence of computer viruses.

www.focusdiy.co.uk
_________________________________________________________________

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>