[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: RE: How to get output XML same as input XML?

Subject: Re: RE: How to get output XML same as input XML?
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Sun, 13 Jul 2003 08:58:20 +0200
xsl copy input to output
Judging from what you wrote, nobody in this group could really help you,
unless you first spent the time to read a good book on XSLT.

Reading Jeni's "Beginning XSLT" and Mike's "XSLT Programmer's Reference"
will save a lot of time and confusion.

Then probably you'd have solved your current problem and would be able to
formulate problems that are meaningful in the context of XSLT.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL



"Josh Hone" <icsad@xxxxxxxxxxx> wrote in message
news:Law8-F32bKP7Ie8tlMa00003a7f@xxxxxxxxxxxxxx
> Hi all -
>
> First, let me thank you all for the helpful advice.  Other mailing boards
I
> have been on are usually much less helpful (see Jetspeed....).  Second,
let
> me explain my app a little better, and tell you about a problem I had with
> xsl:copy (i did not try xsl:copy-of).  In the XML I am dealing with, I
> always have two child elements of the root element which I parse with two
> different stylesheets.  Since the stylesheets cannot be loaded
dynamically,
> I do the separate parsing in my Xalan code.  The stylesheets are
identified
> by an attribute on each child element of the root node.  Once the
> stylesheets parse the input XML, the result gets streamed into the same
> file, one child element of the root node on top of the other.  So, if I am
> going to create a valid XML document from this, I need to open an element
in
> one template but close it in another template describing the other child
> element.
>
> xsl:copy would not put the namespace definition for one of my attributes.
> Specifically, one of the child elements of the root node of the original
XML
> document would have attributes from another namespace than the one that
the
> element is defined under.  xsl:copy does not provide a definition of the
> namespace of the attributes which belong to other namespaces.
Specifically,
> the namespaces of the attributes were defined in the root element.  I
> suspect that is why xsl:copy fails to make a valid document in this case,
> since a straight copy doesn't include a definition of something defined
> outside the stylesheet.  But I am not sure.  As I said, I did not try
> xsl:copy-of.
>
> I ended up creating a Perl script as the output of the stylesheets and
using
> ASCII characters to write the opening tag in one template and a closing
tag
> in another.  The Perl script writes the XML to a file, including resolving
> the ASCII codes, producing a valid document with essentially two wrapped
> child elements of the former root node.  An example result document is at:
>
>
http://hnpux3.physics.fsu.edu/~hone/hnpuxpadmin_2003-07-12_10-17-11.959.xml
>
> with the stylesheets which produced this document referenced therein.
>
> Thanks again and I will respond to any questions,
> Josh Hone
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>




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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.