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

illegal elements must go...

Subject: illegal elements must go...
From: Jukka.T.Lehtinen@xxxxxxxxx
Date: Thu, 24 Aug 2000 10:53:16 +0300
elements to go
Hi all!

I have struggled couple of days with this problem (well, still new in XSLT).

I'm having parent element which can have many childrens (in source). But the
result side (in DTD) there are fewer possible elements. So, solution I'm
gonna do is to put those 'illegal' (in result side) elements childrens of
para element(s).

e.g:
 
source:
---------------------------------------------
<entry>
	<para>sometext</para>
	<jibii>sometext</jibiii>
	sometext without tags - illegal
	<zzz>illegal element in result</zzz>
	<xxx>another illegal elem</xxx>
    <jibii>this elem is good</jibii>
    <xxx>another illegal</xxx>
</entry>
---------------------------------------------

result I want:
---------------------------------------------
<entry>
	<para>sometext</para>
	<jibii>sometext</jibiii>
	<para>            <!-- this is my problem -->
	sometext without tags - illegal
	<zzz>illegal element in result</zzz>
	<xxx>another illegal elem</xxx>
	</para>           <!-- this is my problem -->
    <jibii>this elem is good</jibii>
	<para>
    <xxx>another illegal</xxx>
	</para>
</entry>
----------------------------------------------	

But, I want them so that one added para element have all forthcoming illegal
elemnts in as its children(like in example). Not so that every illegal
element has parent para element of its own. So I have to test if the element
is illegal AND if the next element is also illegal, and next... and when
next elemnt is  ok. then put </para> element before ok element. And that
PCDATA text - children of entry is also giving me some extra gray hairs.

Any good solutions ???

I ja tried quite many different solutions and there were all quite wrong, so
I'm not gonna add them there as a bad example :-).

Thanks very much in advance.

And cheers... this list rocks. 

Jukka. 


 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.