OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Converting XML

[ Lists Home | Date Index | Thread Index ]
  • To: tedd <tedd@sperling.com>, xml-dev@lists.xml.org
  • Subject: Re: [xml-dev] Converting XML
  • From: Prakash Yamuna <techpy@yahoo.com>
  • Date: Tue, 28 Dec 2004 14:53:59 -0800 (PST)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=3qI6XGMAw3eGRmZjZhTqwZ6sHvUvGiX6ZI5A96dngDxjAx1LPLpNseHtUnN+W9wEN5l5js9CBjlYc+D6g/WkvHCeaO8ylHpeli6M3ElA0Epxlp0uor2gLMyjPRzx5dM/YyxDw1xLaqnWb0FWVFVq6piF+M7BJXY4a5YpF+mceGs= ;
  • In-reply-to: <p0620070bbdf785951a41@[]>

Consider the following example:
Now if you wanted to convert the above to:
<em class="Book">
   <em class="BookTitle">blah1</em>
   <em class="Authors">
       <em class="Author">blah2</em>
       <em class="Authror">blah3</em>
Then with the first method you would have a template rule for "Book", "BookTitle", "Authors", "Author"
Instead you could perhaps write a generic template where it works for any element name...
Again I would stick with the first solution if the requirement is simple and it is a one-off scenario.
The more generic one is more applicable when you want to leverage the same xslt for xml documents independent of element names, etc.
So what I had in mind in terms of "scale" was pretty much the number of template rules you would have to write.
If you are new to XSLT then again you may be better off with the first solution it is simple and easy to implement and understand.
tedd <tedd@sperling.com> wrote:
>If your requirement is more generic in that replace specific element
>names with a more generic for all element
>names, then solution provided below won't scale. You may want to use
>a more generic template instead...


Thanks for the advice -- but, I'm not sure as to what "scale" means
in this problem.

Please understand that compared to most of the others on this list, I
flounder around the bottom of the geek scale.


ps: I wonder if anyone on this list knows where the term "geek" came from?

The xml-dev list is sponsored by XML.org , an
initiative of OASIS

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription

Do you Yahoo!?
The all-new My Yahoo! What will yours do?


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS