Altova Mailing List Archives


Re: Relate elements

From: "Neil Smith [MVP Digital Media]" <neil@------.--->
To: NULL
Date: 9/9/2004 10:26:00 PM
With my limited understanding of XML,are you sure you can use @ as a
prefix of an attribute e3g Name="@PONumber" ? 

It just strikes me it might cause problems in transformation. I'm sure
people on here will be able to correct this misapprehension ;-))

Cheers - Neil

On Thu, 9 Sep 2004 20:15:31 +0100, "Sean Tynan"
<stynan@NO--SPAM.missionmaker.com> wrote:

>I have the following XML document:
>
><Database>
>
><Procedures>
>
><Procedure Name="procCancelOrder" />
>
><Procedure Name="procCheckEmail" />
>
><Procedure Name="procCSV_Orders" />
>
><Procedure Name="procDeleteChargeTo" />
>
></Procedures>
>
><Parameters>
>
><Parameter Object="procCancelOrder" Name="@intUserID" DataType="int"
>Direction="in" />
>
><Parameter Object="procCheckEmail" Name="@varUser_EmailId"
>DataType="varchar" Direction="in" Length="100" />
>
><Parameter Object="procCSV_Orders" Name="@PONumber" DataType="varchar"
>Direction="in" Length="18" />
>
><Parameter Object="procCSV_Orders" Name="@Product" DataType="varchar"
>Direction="in" Length="100" />
>
><Parameter Object="procCSV_Orders" Name="@Supplier" DataType="varchar"
>Direction="in" Length="30" />
>
><Parameter Object="procCSV_Orders" Name="@DepartmentExact"
>DataType="varchar" Direction="in" Length="30" />
>
><Parameter Object="procCSV_Orders" Name="@Order_To_Date" DataType="datetime"
>Direction="in" />
>
><Parameter Object="procDeleteChargeTo" Name="@intCreated_By" DataType="int"
>Direction="in" />
>
></Database>
>
>I want to transform the document to so that each parameter element is
>located under its parent Procedure element, matching the Parameter Object
>attribute with the Name attribute of the Procedure element.
>
>i.e. something like this:
>
><Database>
>
><Procedures>
>
><Procedure Name="procCancelOrder" />
>
>    <Parameter Name="@intUserID" DataType="int" Direction="in" />
>
></Procedure >
>
><Procedure Name="procCheckEmail" />
>
>    <Parameter Object="procCheckEmail" Name="@varUser_EmailId"
>DataType="varchar" Direction="in" Length="100" />
>
></Procedure >
>
><Procedure Name="procCSV_Orders" />
>
>    <Parameter Name="@PONumber" DataType="varchar" Direction="in"
>Length="18" />
>
>    <Parameter Name="@Product" DataType="varchar" Direction="in"
>Length="100" />
>
>    <Parameter Name="@Supplier" DataType="varchar" Direction="in"
>Length="30" />
>
>    <Parameter Name="@DepartmentExact" DataType="varchar" Direction="in"
>Length="30" />
>
>    <Parameter Name="@Order_To_Date" DataType="datetime" Direction="in" />
>
></Procedure >
>
><Procedure Name="procDeleteChargeTo" />
>
>    <Parameter Name="@intCreated_By" DataType="int" Direction="in" />
>
></Procedure >
>
></Procedures>
>
><Parameters>
>
></Database>
>
>I'm new to XSLT, any help much appreciated.
>
> - Sean.
>

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.