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

Re: Novice question: selecting an element based on an

Subject: Re: Novice question: selecting an element based on an attribute id
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Thu, 21 Mar 2002 03:01:26 -0800
peter davis michael davis
On Thursday 21 March 2002 00:46, Michael Kay wrote:
> > Anyway, the transformation is:
> >   1.  Look for elements in the source with the attribute
> > "field" and use that as an element in the target. Hence, you see that
> >
> > <String field="_str1" myId="28"><![CDATA[a test of
> > referencing.]]></String>
> >
> > becomes
> >
> > <_str1><![CDATA[a test of string referencing.]]></_str1>
>
> So what are the criteria that turn the value "a test of referencing" into
> "a test of string referencing"? I still don't understand.
>
> Michael Kay

<_str1> is a tag with a value and id "28".  <_str3> is a tag that references 
the value of the tag with id "28" via refid="28".

So since the value of <String field="_str1"> was "<![CDATA[a test of string 
referencing.]]>" (ignoring the fact that the CDATA won't be copied), <_str3> 
also gets a copy of this value because it references _str1.

I believe his input document is output from the JSX project -- Java 
Serialization to XML (but I could be wrong).  As you probably know, in 
serialization each object is only written once, and future references to the 
same object use a reference id, to prevent both wasted space and infinitely 
recursive graphs.  So that would be where he's getting the refid="28" and why 
he want's a copy of the value (since they started out as the same 
object/value).

-- 
Peter Davis
By rule #1, 5.005 should always allow localization of lexical @_ . . .
             -- Larry Wall in <199710011704.KAA21395@xxxxxxxx>

 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.