|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] unique elements from different sourcefile
hi,
i'm really having a hard time figuring this little problem. because of
simplicity and performance i used the muench method for finding unique
elements and whatever else i needed. but this one just doesn't work for
me. maybe i'm just too desperate to solve it myself....
i have a xml represantation of a dtd, generated by norman walshs
dtdparse script in a separate xml file.
all i want is getting all possible children of a specific element. since
the content model of some elements can be very complicated (such as
"head"), most xpath axis don't work.
i looked through the faq, but the methods with the following axis are
not working either. maybe someone could help me through this little one.
<dtd>
<element name="head" content-type="element">
<content-model-expanded>
<sequence-group>
<or-group occurrence="*">
<element-name name="meta"/>
<element-name name="link"/>
<element-name name="object"/>
</or-group>
<or-group>
<sequence-group>
<element-name name="title"/>
<or-group occurrence="*">
<element-nam name="meta"/>
<element-name name="link"/>
<element-name name="object"/>
</or-group>
<sequence-group occurrence="?">
<element-name name="base"/>
<or-group occurrence="*">
<element-name name="meta"/>
<element-name name="link"/>
<element-name name="object"/>
</or-group>
</sequence-group>
</sequence-group>
<sequence-group>
<element-name name="base"/>
<or-group occurrence="*">
<element-name name="meta"/>
<element-name name="link"/>
<element-name name="object"/>
</or-group>
<sequence-group>
<element-name name="title"/>
<or-group occurrence="*">
<element-name name="meta"/>
<element-name name="link"/>
<element-name name="object"/>
</or-group>
</sequence-group>
</sequence-group>
</or-group>
</sequence-group>
</content-model-expanded>
</element>
</dtd>
i think i have to use at least two for loops, because if i generate the
ids in one for loop as usual (without document() function) the first
ones are not always identical and the xsl:for-each and xsl:key are not
at the same nodeset. do i first have to
<xsl:for-each
select="document($xsldtdfile)/dtd/element[@name=current()]/content-model-expanded">
and then
<xsl:for-each select=".//element-name">
with
<xsl:key name="uChilds" match=".//element-name" use="@name" />
????
what do my xsl:key and xsl:for-each(s) have to look like. i tried many
things, i just don't want to write here.
thank you for your help.
thomas winkler
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








