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

Multiple detaillines 2

Subject: Multiple detaillines 2
From: "Joeri Belis" <joeri.belis@xxxxxxxxxxxx>
Date: Tue, 26 Mar 2002 08:42:28 +0100
multiple of 2
XML 1 contains 1 detail line. And this is just a dummy mask. The mask just
tells me that i have atleast one line with a rownumber and article
description. The data dummies are perhaps not really necessary.

ex.

XML 1

<row>
  <cell>
    <namedcell name="rownumber"/>
    <namedcell name="article"/>
  </cell>
</row>

should become

<row>
  <cell>
    <data>1</data>
    <data>Article A</data>
    <data>2</data>
    <data>Article B</data>
    <data>3</data>
    <data>Article C</data>
  </cell>
</row>

I get my data from XML 2. My problem is that i have to put the dummy data in
XML 1 to have the namedcell elements
( this is an excel file saved as XML ).

<row>
  <cell>
    <data>dummy_rownumber</data>
    <namedcell name="rownumber"/>
    <data>dummy_art_desc</data>
    <namedcell name="article"/>
  </cell>
</row>

What i want to do is replace one line with multiple lines based on the fact
that namecell is set.
So i need to remove the dummy mask and add lines.

So my real question is. how can i replace 1 line with multiple lines.

xml 2 ( i have removed the header to make it more clear ).

<order>
    <orderline nrl="1">
    <data>Article A</data>
    </orderline>
    <orderline nrl="2">
    <data>Article B</data>
    </orderline>
    <orderline nrl="3">
    <data>Article C</data>
    </orderline>
</order>


Joeri

----- Original Message -----
From: "Jörg Heinicke" <joerg.heinicke@xxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, March 25, 2002 6:46 PM
Subject: Re:  multiple detaillines


> Hi Joeri,
>
> I have a problem with your code: I can't see any connection between XML 1
> and XML 2/XML Output. It's no problem to create XMl Output from XML 2, but
> with XML 1? Maybe you explain it a bit more explicitely. Your stylesheet
> (replacing 1 cell) can maybe help too.
>
> Regards,
>
> Joerg
>
>
> > hi
> >
> > I have 2 XML files. One file being being a simplified excel XML file
which
> > is my input XML also.
> > My second XML file contains the data that is want to replace in the
first
> > XML.
> >
> > Replacing 1 cell works fine. But now i want to add multiple detail
lines.
> > The "template" file only contains 1 (one) detail line with a dummy data
> > element and a named element
> > the give info on what needs to inserted in the dummy element.
> >
> > So i need to replace the dummy line and add more lines.
> >
> > take a look at the example XML files for a better understanding what my
> > output looks like.
> > Thanks for any help.
> >
> > XML 1 ( simplified excel XML generated file )
> >
> > <row>
> >   <cell>
> >     <data>9</data>
> >     <namedcell name="rownumber"/>
> >     <data>x</data>
> >     <namedcell name="article"/>
> >   </cell>
> > </row>
> >
> >
> > XML 2
> >
> > <order>
> >   <header>
> >     <ordernr>100</ordernr>
> >   </header>
> >   <details>
> >     <orderline nrl="1">
> >  <data>Article A</data>
> >     </orderline>
> >     <orderline nrl="2">
> >  <data>Article B</data>
> >     </orderline>
> >     <orderline nrl="3">
> >  <data>Article C</data>
> >     </orderline>
> >   </details>
> > </order>
> >
> > output XML
> > <row>
> >   <cell>
> >     <data>1</data>
> >     <data>Article A</data>
> >     <data>2</data>
> >     <data>Article B</data>
> >     <data>3</data>
> >     <data>Article C</data>
> >   </cell>
> > </row>
> >
> >
> >



 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.