R
ReGenesis0
Hey all- I'm just astarting out, and this is what I'm running into--
given XML
<container>
<subject>
<name>John Smith</name>
<age>22</age>
</subject>
<subject>
<name>Mariko Suzuhara</name>
</subject>
</container>
How do I transform this to-
<test_group>
<subject age="22">John Smith</subject>
<subject>Mariko Suzuhara</subject>
</test_group>
Such that the Age attribute remains undeclared if it was not present in
the original.
I feel liek there should be an elegant and somple solution to this that
does not involve xsl:choose (since these blocks are actually div's with
more complex content that would be duplicated.)
I've butted my head up against online help and several books, and have
concluded (since I've run across no one asking the same question and
beign shot down) that I'm simply asking the Wrong Question, and am
probably missing something obvious. I don't think it stems from having
a Pull mentality though...
....help?
-Derik
given XML
<container>
<subject>
<name>John Smith</name>
<age>22</age>
</subject>
<subject>
<name>Mariko Suzuhara</name>
</subject>
</container>
How do I transform this to-
<test_group>
<subject age="22">John Smith</subject>
<subject>Mariko Suzuhara</subject>
</test_group>
Such that the Age attribute remains undeclared if it was not present in
the original.
I feel liek there should be an elegant and somple solution to this that
does not involve xsl:choose (since these blocks are actually div's with
more complex content that would be duplicated.)
I've butted my head up against online help and several books, and have
concluded (since I've run across no one asking the same question and
beign shot down) that I'm simply asking the Wrong Question, and am
probably missing something obvious. I don't think it stems from having
a Pull mentality though...
....help?
-Derik