This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

parent node/ child node


Hi,

	I'm trying to replace a missing attribute in a node with the a default
	that is stored in its' parent node. i.e.:

	from this:
	<parent defaultAttribute="defaultAttributeValue">
		<child attribute="attributeValue"/>
		<child attribute="attributeValue"/>
		<child/>
		<child attribute="attributeValue"/>
	</parent>
	<parent defaultAttribute="defaultAttributeValue1">
		<child attribute="attributeValue"/>
		<child attribute="attributeValue"/>
		<child attribute="attributeValue"/>
		<child/>
	</parent>


	to this after the transformation:

	<parent defaultAttribute="defaultAttributeValue">
		<child attribute="attributeValue"/>
		<child attribute="attributeValue"/>
		<child defaultAttribute="defaultAttributeValue"/>
		<child attribute="attributeValue"/>
	</parent>
	<parent defaultAttribute="defaultAttributeValue1">
		<child attribute="attributeValue"/>
		<child attribute="attributeValue"/>
		<child attribute="attributeValue"/>
		<child defaultAttribute="defaultAttributeValue1"/>
	</parent>

	When the child attribute is missing I would like to add the
	defaultAttribute of the appropriate parent.
	All the parent tags have the same name.




	Does anyone know if this is possible, and if yes what direction I should take.

	many thanks,

	james

	
		



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]