xslt help
Added by Anonymous almost 14 years ago
Legacy ID: #8675067 Legacy Poster: Saraswathy (saraswathy6)
Hi, I'm new to xslt I have an xml as follows hhs.fda.ora.mar hhs.fda.ora.fms hhs.fda.ora.oss hhs.fda.cvm.med hhs.fda.cvm.care hhs.fda.cder.de hhs.fda.ora.fax hhs.fda.ora.fml hhs.fda.ora.elex hhs.fda.cvm.fed hhs.fda.cber.res hhs.fda.cder.eval hud.cp.com.hou hud.cp.com.law hud.fhe.com.hou hud.lpr.com.hou hud.pih.com.hou hud.sdbe.com.hou hud.sdbe.com.law hhs.nih.nci.cbt hhs.nih.nci.tms hhs.nih.nci.tbs hhs.nih.nci.edrg hhs.nih.nci.ncs hhs.nih.nci.edr ... ... ... I need an output html display as hhs.fda hhs.fda.ora.mar hhs.fda.ora.fms hhs.fda.ora.oss show upto 10 hhs.nih hhs.nih.nci.tms hhs.nih.nci.tbs hhs.nih.nci.edg show upto 10 hud.cp hud.cp.com.law hud.cp.com.hou show upto 10 hud.sdbe hud.sdbe.com.law hud.sdbe.com.hou show upto 10 Show all top 20 agencies Clicking on show upto 10 link should display upto 10 agenecies under x+.y+ Clicking on how all top 20 agencies should display upto upto 20 agencies of the form x+.y+ like hhs.fda hhs.nci hud.cp hud.sbde and so on. How do I do that in xslt? Thank you for your help Saraswathy.
Replies (2)
RE: xslt help
-
Added by Anonymous almost 14 years ago
Legacy ID: #8675334 Legacy Poster: Michael Kay (mhkay)
I'd recommend posting requests for XSLT coding help on xsl-list at mulberrytech.com - this list is intended for things specific to the Saxon product. A general point of advice, though: before asking the question, be sure you know exactly what HTML you want to generate - if necessary produce a mock-up by hand and ensure it behaves the way you want in the browser.. Don't confuse the two separate topics of designing your HTML and designing the XSLT to generate it. The general technique for grouping into fixed size groups is typically along the lines of <xsl:for-each-group select="agency" group-by="position() idiv 10"> <xsl:apply-templates select="current-group()"/>
RE: xslt help
-
Added by Anonymous almost 14 years ago
Legacy ID: #8675440 Legacy Poster: Saraswathy (saraswathy6)
Thank you Michael. Points taken.
Please register to reply