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

Re: can I *undefine* an attribute via xsl:attribute?

Subject: Re: can I *undefine* an attribute via xsl:attribute?
From: "Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 3 Aug 2020 13:53:09 -0000
 Re: can I *undefine* an attribute via xsl:attribute?
Chris,

Maybe what you had mixed up is the difference between creating an attribute
and adding an attribute to the result tree.

Once you've added an attribute to the result tree, you can't remove it, or it
wouldn't be the result tree. You can certainly add an attribute to a temporary
tree, then copy that attribute (or not), to the result tree. There are a
number of ways that can be accomplished.

Cheers, Wendell

From: Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Saturday, August 1, 2020 11:04 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  can I *undefine* an attribute via xsl:attribute?

Hi all,

I would like to call a template that creates various attributes, then
conditionally *undefine* certain attributes, using some **MAGIC** below:

<xsl:template name="create-my-attributes>
  <xsl:call-template name="create-their-attributes"/>
  <xsl:attribute name="unwanted-attribute" select=**MAGIC**/>
</xsl:template>

A later xsl:attribute definition overrides an earlier value. But can I somehow
define an attribute as "undefined" to uncreate it? The spec at

https://www.w3.org/TR/xslt-30/#creating-attributes<https://gcc02.safelinks.pr
otection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FTR%2Fxslt-30%2F%23creati
ng-attributes&data=02%7C01%7Cwendell.piez%40nist.gov%7C28cc03313d8749dbe46908
d8362c1b47%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637318910352971473&sd
ata=3XurZqUO7B%2Fuduc4MP4eD%2Bi5bhxoJCa5CkF3MT9diEU%3D&reserved=0>

doesn't mention this as an option, but I'm a novice and perhaps I missed
something.

Thanks!

-----
Chris Papademetrious
Tech Writer, Implementation Group
(610) 628-9718 home office
(570) 460-6078 cell

XSL-List info and
archive<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
mulberrytech.com%2Fxsl%2Fxsl-list&data=02%7C01%7Cwendell.piez%40nist.gov%7C28
cc03313d8749dbe46908d8362c1b47%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C6
37318910352971473&sdata=dLnxIEN87Wf1xv21doc8IVum1bvpZEVj9ps4khlH0Rc%3D&reserv
ed=0>
EasyUnsubscribe<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2
F%2Flists.mulberrytech.com%2Funsub%2Fxsl-list%2F3302254&data=02%7C01%7Cwendel
l.piez%40nist.gov%7C28cc03313d8749dbe46908d8362c1b47%7C2ab5d82fd8fa4797a93e05
4655c61dec%7C1%7C0%7C637318910352981430&sdata=sJ%2BksZ6KWKyw15Re5Xf1stLpndXW4
0gUtZA6FvBYwvI%3D&reserved=0> (by email<>)

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.