Get two XML data elements to appear on the same line

I am importing XML into Adobe InDesign. Using the following XSLT I am trying to massage the XML to create the desired data flow.My XSLT is working almost perfectly thanks to help here on StackOverflow. I have just a couple of persistent problems that I can't seem to overcome. I've tried dozens of options but I'm still stumped.The XML has four basic levels \[code\]<Root><Story<CL>+<BK>+...</BK></CL></Story><Root>\[/code\]The CL and the BK nodes have multiple elements. I am trying to get two elements that appear under the CL node to appear on the same line in the XSLT result, but have not been able to get it to work no matter what I try.Here is the full XSLT, remember the only thing I'm trying to do is to get the elements \[code\]<CityDescription>\[/code\] and \[code\]<Population>\[/code\] to appear on the same line in the output:\[code\]<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="no" /> <xsl:strip-space elements="*"/> <xsl:output method="XML"/> <xsl:template match="/"> <Root> <Story><xsl:apply-templates select="Root/Story/CL"/></Story> </Root> </xsl:template> <xsl:template match="CityDescription"><CityDescription><xsl:value-of select="."/></CityDescription><xsl:text> </xsl:text></xsl:template><xsl:template match="CL/Population"><Population><xsl:value-of select="."/></Population></xsl:template> <xsl:template match="BankName | Address1 | Hours | Established | RoutingNbr | CO/CityOfficePhone | CO/CityOfficeAddress2 "><xsl:element name="{name()}"><xsl:value-of select="."/></xsl:element></xsl:template> <xsl:template match="BK"> <xsl:apply-templates select="BankName"/><xsl:text> </xsl:text><xsl:apply-templates select="Established"/><xsl:text> </xsl:text><xsl:apply-templates select="RoutingNbr"/><xsl:text> </xsl:text> <xsl:apply-templates select="OfficeOfLabel"/> <xsl:apply-templates select="Address1"/><xsl:text> </xsl:text><xsl:apply-templates select="Hours"/><xsl:text> </xsl:text> <xsl:apply-templates select="Address2"/><xsl:apply-templates select="Zip"/> <xsl:apply-templates select="Phone"/><xsl:apply-templates select="Fax"/><xsl:text> </xsl:text> <xsl:apply-templates select="Email"/> <xsl:apply-templates select="Web"/> <xsl:apply-templates select="HoldingCo"/> <xsl:apply-templates select="TotalAssets"/><xsl:apply-templates select="TotalLiabilities"/> <xsl:apply-templates select="TotalDeposits"/><xsl:apply-templates select="EquityCapital"/> <xsl:apply-templates select="EH/Employee"/> <xsl:apply-templates select="D"/> <xsl:apply-templates select="CB"/> <xsl:apply-templates select="OFF"/> <xsl:apply-templates select="CO"/> <xsl:apply-templates select="MultiBankLabel"/> <xsl:apply-templates select="IBAGroup"/><xsl:apply-templates select="FDICNbr"/> </xsl:template> <xsl:template match="HoldingCo"> <HoldingCo> <xsl:text>Holding Co: </xsl:text> <xsl:value-of select="."/></HoldingCo><xsl:text> </xsl:text></xsl:template> <xsl:template match="Phone"> <Phone><xsl:value-of select="."/></Phone><xsl:text> </xsl:text></xsl:template> <xsl:template match="Fax"> <Fax><xsl:value-of select="."/></Fax></xsl:template> <xsl:template match="EH/Employee"> <Employee><xsl:value-of select="."/></Employee><xsl:text> </xsl:text></xsl:template> <xsl:template match="Zip"> <Zip><xsl:value-of select="."/></Zip><xsl:text> </xsl:text></xsl:template> <xsl:template match="Address2"> <Address2><xsl:value-of select="."/></Address2><xsl:text> </xsl:text> </xsl:template> <xsl:template match="Email"> <Email><xsl:value-of select="."/></Email><xsl:text> </xsl:text></xsl:template> <xsl:template match="Web"> <Web><xsl:text>Web: </xsl:text><xsl:value-of select="."/></Web><xsl:text> </xsl:text></xsl:template> <xsl:template match="TotalAssets"> <TotalAssets><xsl:text>Total Assets $</xsl:text><xsl:value-of select="."/></TotalAssets><xsl:text> </xsl:text> </xsl:template> <xsl:template match="TotalLiabilities"> <TotalLiabilities><xsl:text>Total Liabilities $</xsl:text> <xsl:value-of select="."/></TotalLiabilities><xsl:text> </xsl:text></xsl:template> <xsl:template match="TotalDeposits"> <TotalDeposits><xsl:text>Total Deposits </xsl:text> <xsl:value-of select="."/></TotalDeposits><xsl:text> </xsl:text> </xsl:template> <xsl:template match="EquityCapital"> <EquityCapital><xsl:text>Equity Capital </xsl:text><xsl:value-of select="."/></EquityCapital><xsl:text> </xsl:text></xsl:template> <xsl:template match="IBAGroup"> <IBAGroup><xsl:text>IBA Group: </xsl:text><xsl:value-of select="."/></IBAGroup><xsl:text> </xsl:text> </xsl:template> <xsl:template match="FDICNbr"> <FDICNbr><xsl:text>FDIC Certificate No.: </xsl:text><xsl:value-of select="."/></FDICNbr><xsl:text> </xsl:text></xsl:template> <xsl:template match="OFF"><OfficeLabel><xsl:value-of select="OfficeLabel"/><xsl:text>: </xsl:text></OfficeLabel><Office><xsl:value-of select="Office"/></Office><xsl:text> </xsl:text></xsl:template> <xsl:template match="D"><DirectorLabel><xsl:value-of select="DirectorLabel"/><xsl:text>: </xsl:text></DirectorLabel><Director><xsl:value-of select="Director"/></Director><xsl:text> </xsl:text></xsl:template> <xsl:template match="CB"><CorrespondingBankLabel><xsl:value-of select="CorrespondingBankLabel"/></CorrespondingBankLabel><xsl:text>: </xsl:text><CorrespondingBank><xsl:value-of select="CorrespondingBank"/></CorrespondingBank><xsl:text> </xsl:text></xsl:template> <xsl:template match="OfficeOfLabel"> <OfficeOfLabel><xsl:value-of select="."/></OfficeOfLabel><xsl:text> </xsl:text></xsl:template> <xsl:template match="CO"><CityOfficeLabel><xsl:value-of select="CityOfficeLabel"/><xsl:text>: </xsl:text></CityOfficeLabel><CityOfficeAddress1><xsl:value-of select="CityOfficeAddress1"/></CityOfficeAddress1><xsl:text> </xsl:text><CityOfficeZip><xsl:value-of select="CityOfficeZip"/></CityOfficeZip><xsl:text> </xsl:text><CityOfficePhone><xsl:value-of select="CityOfficePhone"/></CityOfficePhone><xsl:text> </xsl:text></xsl:template> </xsl:stylesheet> \[/code\]
 
Back
Top