| Author |
Need help transforming parent-child xml
|
|
| Drew Mace 2004-03-21, 5:29 pm |
| Here is the scenario:
There is an index.xml file that specifies sections of content in the example
below. Each attribute "chunkiid" is another XML document...for example
there is a 35427.xml. I would like to have 1 xsl file that takes random
chunkiid's and loads that XML then transforms that xml. I am not sure how
to start going about this. Thanks in advance for any help.
Drew
- <Index iid="36334" lang="en">
- <FrontMatter>
...
</FrontMatter>
- <IndexBody>
- <LinkList>
<ListHeader>...</ListHeader>
<ArticleLink docid="..." chunkiid="35427" linkto="doc">...</ArticleLink>
<ArticleLink docid="..." chunkiid="35428" linkto="doc">...</ArticleLink>
<ArticleLink docid="..." chunkiid="33715" linkto="doc">...</ArticleLink>
<ArticleLink docid="..." chunkiid="33786" linkto="doc">...</ArticleLink>
</LinkList>
</IndexBody>
- <BackMatter>
- <LastReview>
- <ReviewerName>
<ArticleLink docid="..." chunkiid="23449" linkto="doc">...</ArticleLink>
</ReviewerName>
<ReviewDate>...</ReviewDate>
</LastReview>
</BackMatter>
</Index>
| |
| Drew Mace 2004-03-21, 5:29 pm |
| I think what i need in transclusion - am i on the right track?
"Drew Mace" <drewmace@NOSPAMcomcast.net> wrote in message
news:58GdnQokZJ6DnMPdRVn-jA@comcast.com...
> Here is the scenario:
> There is an index.xml file that specifies sections of content in the
example
> below. Each attribute "chunkiid" is another XML document...for example
> there is a 35427.xml. I would like to have 1 xsl file that takes random
> chunkiid's and loads that XML then transforms that xml. I am not sure how
> to start going about this. Thanks in advance for any help.
>
> Drew
> - <Index iid="36334" lang="en">
> - <FrontMatter>
> ...
> </FrontMatter>
> - <IndexBody>
> - <LinkList>
> <ListHeader>...</ListHeader>
> <ArticleLink docid="..." chunkiid="35427" linkto="doc">...</ArticleLink>
> <ArticleLink docid="..." chunkiid="35428" linkto="doc">...</ArticleLink>
> <ArticleLink docid="..." chunkiid="33715" linkto="doc">...</ArticleLink>
> <ArticleLink docid="..." chunkiid="33786" linkto="doc">...</ArticleLink>
> </LinkList>
> </IndexBody>
> - <BackMatter>
> - <LastReview>
> - <ReviewerName>
> <ArticleLink docid="..." chunkiid="23449" linkto="doc">...</ArticleLink>
> </ReviewerName>
> <ReviewDate>...</ReviewDate>
> </LastReview>
> </BackMatter>
> </Index>
>
>
| |
| Hans-Georg Michna 2004-03-21, 7:29 pm |
| "Drew Mace" <drewmace@NOSPAMcomcast.net> wrote:
>There is an index.xml file that specifies sections of content in the example
>below. Each attribute "chunkiid" is another XML document...for example
>there is a 35427.xml.
Drew,
one way to do this in pure XSLT 1.0 would be to write one XSLT
program that generates script code, which in turn transforms all
the secondary XML files by calling another XSLT program once for
each secondary XML file.
It is usually easy to generate script code from XML/XSLT. You
can use <xsl:output mode="text"/> for that.
I don't know whether there are any extensions beyond XSLT 1.0
that would make this easier.
Hans-Georg
--
No mail, please.
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |