xsl-list
[Top] [All Lists]

[xsl] XQuery basics

2008-06-04 08:43:56
First off, I am not 100% this is the write place to ask this question,
but in years past you all have been very helpful to me with XSLT and
thought you might have some insight or know where I should go to get
the help I need.

I have worked with DOM, SAX, XSLT, and XPath in the past and am now
working with a framework that has XQuery.  The task at hand is very
simple, change (or add if not present) an attribute to one element in
an XML document:

Example: If the name element has an average attribute, change it to
93, otherwise create it and set it to 93
input:

<root>
  <students>
    <name value="scott"/>
  </students>
</root>

or

<root>
  <students>
    <name value="scott" average="90"/>
  </students>
</root>

output:

<root>
  <students>
    <name value="scott" average="93"/>
  </students>
</root>

Is XQuery like XSLT such that I have to build a little script that
will copy everything from the source to the destination and make the
change or add the attribute once I get to it?

Sam

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>