Link to home
Start Free TrialLog in
Avatar of ShaileshShinde
ShaileshShindeFlag for India

asked on

Create Htmls

Hello Experts,

I have an input xml file...and need to create html's files based on this xml...
the structure of input xml file is below...and the output required is something like in table structure...so the as per given input there will be two html files one with name Button.html and other one with TextArea.html in folder like out/mx/controls/Button.html and out/mx/controls/TextArea.html...

Here mx/controls/ are taken from apiClassifier/@id.....

So the final output for Button.html is like.....

Output...Button.html
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td>
<td>
<a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">mx.controls</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td>
<td class="classSignature">public  class  Button<a href="../../mx/core/IDataRenderer.html">IDataRenderer</a>, <a href="../../mx/controls/listClasses/IDropInListItemRenderer.html">IDropInListItemRenderer</a>, <a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a>, <a href="../../mx/controls/listClasses/IListItemRenderer.html">IListItemRenderer</a>, <a href="../../mx/core/IFontContextComponent.html">IFontContextComponent</a>, <a href="../../flash/events/IEventDispatcher.html">IEventDispatcher</a>, <a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a>, <a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a>, <a href="../../mx/styles/ISimpleStyleClient.html">ISimpleStyleClient</a>, <a href="../../mx/core/IUIComponent.html">IUIComponent</a>, <a href="../../flash/display/IBitmapDrawable.html">IBitmapDrawable</a>
</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td>
<td class="inheritanceList">Button  <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> <a href="../../mx/core/UIComponent.html">UIComponent</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> <a href="../../mx/core/FlexSprite.html">FlexSprite</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> <a href="../../flash/display/Sprite.html">Sprite</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> <a href="../../flash/display/DisplayObjectContainer.html">DisplayObjectContainer</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> <a href="../../flash/display/InteractiveObject.html">InteractiveObject</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> <a href="../../flash/display/DisplayObject.html">DisplayObject</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> <a href="../../flash/events/EventDispatcher.html">EventDispatcher</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> <a href="../../Object.html">Object</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td>
<td><a href="../../mx/core/IDataRenderer.html">IDataRenderer</a>, <a href="../../mx/controls/listClasses/IDropInListItemRenderer.html">IDropInListItemRenderer</a>, <a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a>, <a href="../../mx/controls/listClasses/IListItemRenderer.html">IListItemRenderer</a>, <a href="../../mx/core/IFontContextComponent.html">IFontContextComponent</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subclasses</td>
<td><a href="../../mx/containers/accordionClasses/AccordionHeader.html">AccordionHeader</a>, <a href="../../mx/controls/CheckBox.html">CheckBox</a>, <a href="../../mx/controls/LinkButton.html">LinkButton</a>, <a href="../../mx/controls/PopUpButton.html">PopUpButton</a>, <a href="../../mx/controls/RadioButton.html">RadioButton</a>, <a href="../../mx/controls/scrollClasses/ScrollThumb.html">ScrollThumb</a>, <a href="../../mx/controls/sliderClasses/SliderThumb.html">SliderThumb</a></td>
</tr>
</table>

Input.xml
<package id="mx.controls">
<apiClassifier id="mx.controls:Button">
         <apiName>Button</apiName>
         <apiClassifierDef>
            <BaseInterface>
               <apiClassifier id="mx.core:IDataRenderer"/>
               <apiClassifier id="mx.controls.listClasses:IDropInListItemRenderer"/>
               <apiClassifier id="mx.managers:IFocusManagerComponent"/>
               <apiClassifier id="mx.controls.listClasses:IListItemRenderer"/>
               <apiClassifier id="mx.core:IFontContextComponent"/>
               <apiClassifier id="flash.events:IEventDispatcher"/>
               <apiClassifier id="mx.core:IFlexDisplayObject"/>
               <apiClassifier id="mx.managers:ILayoutManagerClient"/>
               <apiClassifier id="mx.styles:ISimpleStyleClient"/>
               <apiClassifier id="mx.core:IUIComponent"/>
               <apiClassifier id="flash.display:IBitmapDrawable"/>
            </BaseInterface>
            <Inheritance>
               <BaseClass>mx.core:UIComponent</BaseClass>
               <BaseClass>mx.core:FlexSprite</BaseClass>
               <BaseClass>flash.display:Sprite</BaseClass>
               <BaseClass>flash.display:DisplayObjectContainer</BaseClass>
               <BaseClass>flash.display:InteractiveObject</BaseClass>
               <BaseClass>flash.display:DisplayObject</BaseClass>
               <BaseClass>flash.events:EventDispatcher</BaseClass>
               <BaseClass>Object</BaseClass>
            </Inheritance>
            <Impliments>
               <apiClassifier id="mx.core:IDataRenderer"/>
               <apiClassifier id="mx.controls.listClasses:IDropInListItemRenderer"/>
               <apiClassifier id="mx.managers:IFocusManagerComponent"/>
               <apiClassifier id="mx.controls.listClasses:IListItemRenderer"/>
               <apiClassifier id="mx.core:IFontContextComponent"/>
            </Impliments>
            <Subclasses>
               <apiClassifier id="mx.containers.accordionClasses:AccordionHeader"/>
               <apiClassifier id="mx.controls.scrollClasses:ScrollThumb"/>
               <apiClassifier id="mx.controls.sliderClasses:SliderThumb"/>
               <apiClassifier id="mx.controls:PopUpButton"/>
               <apiClassifier id="mx.controls:RadioButton"/>
               <apiClassifier id="mx.controls:CheckBox"/>
               <apiClassifier id="mx.controls:LinkButton"/>
            </Subclasses>
         </apiClassifierDef>
      </apiClassifier>

      <apiClassifier id="mx.controls:TextArea">
         <apiName >TextArea</apiName>
         <apiClassifierDef>
            <BaseInterface>
               <apiClassifier id="mx.core:IDataRenderer"/>
               <apiClassifier id="mx.controls.listClasses:IDropInListItemRenderer"/>
               <apiClassifier id="mx.managers:IFocusManagerComponent"/>
               <apiClassifier id="mx.core:IIMESupport"/>
               <apiClassifier id="mx.controls.listClasses:IListItemRenderer"/>
               <apiClassifier id="mx.core:IFontContextComponent"/>
               <apiClassifier id="flash.events:IEventDispatcher"/>
               <apiClassifier id="mx.core:IFlexDisplayObject"/>
               <apiClassifier id="mx.managers:ILayoutManagerClient"/>
               <apiClassifier id="mx.styles:ISimpleStyleClient"/>
               <apiClassifier id="mx.core:IUIComponent"/>
               <apiClassifier id="flash.display:IBitmapDrawable"/>
            </BaseInterface>
            <Inheritance>
               <BaseClass>mx.core:ScrollControlBase</BaseClass>
               <BaseClass>mx.core:UIComponent</BaseClass>
               <BaseClass>mx.core:FlexSprite</BaseClass>
               <BaseClass>flash.display:Sprite</BaseClass>
               <BaseClass>flash.display:DisplayObjectContainer</BaseClass>
               <BaseClass>flash.display:InteractiveObject</BaseClass>
               <BaseClass>flash.display:DisplayObject</BaseClass>
               <BaseClass>flash.events:EventDispatcher</BaseClass>
               <BaseClass>Object</BaseClass>
            </Inheritance>
            <Impliments>
               <apiClassifier id="mx.core:IDataRenderer"/>
               <apiClassifier id="mx.controls.listClasses:IDropInListItemRenderer"/>
               <apiClassifier id="mx.managers:IFocusManagerComponent"/>
               <apiClassifier id="mx.core:IIMESupport"/>
               <apiClassifier id="mx.controls.listClasses:IListItemRenderer"/>
               <apiClassifier id="mx.core:IFontContextComponent"/>
            </Impliments>
            <Subclasses/>
         </apiClassifierDef>
      </apiClassifier>
</package>



Can you pls help to create xslt code for the same....?

Thanks,
Shailesh
Avatar of R7AF
R7AF
Flag of Netherlands image

If I take the following XML:

<test>
      <apiClassifier id="mx.controls.listClasses:IDropInListItemRenderer"/>
</test>

the following xslt will basically do what you need:

<xsl:template match="test">
      <p>Filepath: <xsl:value-of select="translate(substring-before(apiClassifier/@id,':'),'.','/')" /></p>
      <p>File: <xsl:value-of select="substring-after(apiClassifier/@id,':')" /></p>
</xsl:template>
Avatar of ShaileshShinde

ASKER

Hello Experts,

I have to write html's using redirect:write...how to do this in xsl?

Thanks,
Shailesh
Hello ShaileshShinde

I have given a response to your original question. If you have another question, then I suggest you post another question.

Thanks!
Hello Expert,

This is related to same question as need to create html's not html.....
So using redirect:write how it is done?

Thanks,
Shailesh
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial