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

RE: XSLT and XSchema (was Re: keys and idrefs - XSLT2

Subject: RE: XSLT and XSchema (was Re: keys and idrefs - XSLT2 request?)
From: "Seaborne, Mark" <Mark_Seaborne@xxxxxxxxxxxx>
Date: Tue, 16 Oct 2001 10:40:08 +0200
names of mathematican
What about something along the lines of 

<party role="payee">
	<address> ....

<party role="supplier">
	<address> ....

or, if you prefer

<party>
	<role>payee</role>
	....


I am currently working on an application where I have had to deal with
exactly this problem, and for practical reasons with which I won't bore you,
we adopted the latter approach, and have found that it is perfectly
serviceable, at least for our application.


All the best

Mark Seaborne



-----Original Message-----
From: Joerg Pietschmann [mailto:joerg.pietschmann@xxxxxx]
Sent: 16 October 2001 09:15
To: XSL List
Subject: XSLT and XSchema (was Re:  keys and idrefs - XSLT2
request?)


David Carlisle <davidc@xxxxxxxxx> wrote
> Knowing an attribute is a date is good, I'd hope to use date arithmetic
> in XPath 2, but I can't imagine ever wanting to (for example) match
> elements by some complex schema type rather than name.

Hmm, this makes me think. While trained as mathematican, i'm
probably working in business software too long:
- define a complex data type "adress"
- use it under various names, which usually denote roles (excuse
  the pseudo schema code, can't be bothered to look up the exact
  syntax :-)

  element address
    name: string
    zip: string
    city: string
    ...

  element order
   residentaddress : address
   shippingaddress : address
   ...

Am i mistaken that a valid XML instance would look like
the following?
 <order>
  <residentaddress>
   <name>...</name>
   ...
  </residentaddress>
  <shippingaddress>
   ...
 
If so, matching the type "address" might be preferable to
writing a template for every address role, or dispatching
via <apply-template select="*[contains(name(),'address']"
   mode="address"/>
or something.
I do not claim that the schema above is actually well designed,
if there are alternatives, i'd like to hear about them.

Regards
J.Pietschmann

 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.