Click here to Skip to main content

XML / XSL

    RSS: RSS Feed

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
NewsBuilding Web 2.0 UIs with JSF, Realtime Updates with JSF and Ajax Push Taught at GIDS 2010 PinmemberShaguf Mohtisham21:31 3 Mar '10  
QuestionVS2005 doesn't like my XML Schema Pinmembergritter6:10 3 Mar '10  
AnswerRe: VS2005 doesn't like my XML Schema Pinmembergritter7:41 3 Mar '10  
AnswerRe: VS2005 doesn't like my XML Schema PinmvpStuart Dootson5:58 6 Mar '10  
QuestionMessage Removed Pinmemberishwarya mahadevan23:00 2 Mar '10  
GeneralRe: xml code editor PinmemberCovean23:21 2 Mar '10  
QuestionMultiple children in Node question PinmemberRCoate21:04 1 Mar '10  
I have some xsl that generally works, except when there are multiple children in a node.
 
What I get is:
 
  <File>
    <Person>Person Name</Person>
    <Title>Title 1</Title>
    <BoxLocation>Location 1</BoxLocation>
    <FileName>File Name 1 </FileName>
    <VersionNumber>Version 1</VersionNumber>
    <Title>Title 2</Title>
    <BoxLocation>Location 2</BoxLocation>
    <FileName>File Name 2</FileName>
    <VersionNumber>Version 2</VersionNumber>
  </File>
 
What I am after is:
 
  <File>
    <Person>Person Name</Person>
    <Title>Title 1</Title>
    <BoxLocation>Location 1</BoxLocation>
    <FileName>File Name 1 </FileName>
    <VersionNumber>Version 1</VersionNumber>
  </File>
  <File>
    <Person>Person Name</Person>
    <Title>Title 2</Title>
    <BoxLocation>Location 2</BoxLocation>
    <FileName>File Name 2</FileName>
    <VersionNumber>Version 2</VersionNumber>
  </File>
 

The relevant part of the xsl is:
 
<xsl:for-each select="DBFile">
	<File>
	<xsl:for-each select="Title">
		<Person>
			<xsl:value-of select="."/>
		</Person>
	</xsl:for-each>
	<xsl:for-each select="DBPart">
		<xsl:for-each select="DBDocument">
			<xsl:for-each select="Title">
				<Title>
					<xsl:value-of select="."/>
				</Title>
			</xsl:for-each>
			<xsl:for-each select="DBMetadataFieldValue">
				<xsl:for-each select="DBMetadataValue">
					<xsl:for-each select="Text">
					<BoxLocation>
						<xsl:value-of select="."/>
					</BoxLocation>
					</xsl:for-each>
				</xsl:for-each>
			</xsl:for-each>
			<xsl:for-each select="DBVersion">
				<xsl:for-each select="ArchiveFileName">
					<FileName>
						<xsl:value-of select="."/>
					</FileName>
				</xsl:for-each>
				<xsl:for-each select="Number">
					<VersionNumber>
						<xsl:value-of select="."/>
					</VersionNumber>
				</xsl:for-each>
			</xsl:for-each>
		</xsl:for-each>
	</xsl:for-each>
	</File>
</xsl:for-each>
 
Any advice or assistance pointing me in the right direction will be greatly appreciated.
AnswerRe: Multiple children in Node question PinmvpStuart Dootson22:02 1 Mar '10  
GeneralRe: Multiple children in Node question PinmemberRCoate22:56 1 Mar '10  
GeneralRe: Multiple children in Node question PinmvpStuart Dootson23:04 1 Mar '10  
GeneralRe: Multiple children in Node question PinmemberRCoate12:16 2 Mar '10  
AnswerRe: Multiple children in Node question PinmemberRCoate20:35 2 Mar '10  
GeneralRe: Multiple children in Node question PinmvpStuart Dootson22:46 2 Mar '10  
QuestionHow to de-batch very large XMLDocument into bit size chunks PinmemberONeil Tomlinson8:39 28 Feb '10  
AnswerRe: How to de-batch very large XMLDocument into bit size chunks Pinmemberdaveyerwin9:44 28 Feb '10  
GeneralRe: How to de-batch very large XMLDocument into bit size chunks PinmemberONeil Tomlinson7:33 1 Mar '10  
QuestionUnclosed tr tag PinmemberJohn Jones II5:35 26 Feb '10  
AnswerRe: Unclosed tr tag PinmvpRichard MacCutchan6:23 26 Feb '10  
AnswerRe: Unclosed tr tag PinmvpStuart Dootson8:45 26 Feb '10  
QuestionXML schema - Element name used to identify item problem... - need to use the element name to identify value when importing into SQL 2005 tables PinmemberVicarH8:37 25 Feb '10  
QuestionDisplay a image in picturebox Pinmemberkpuneeth721:36 23 Feb '10  
AnswerRe: Display a image in picturebox PinmvpStuart Dootson21:50 23 Feb '10  
GeneralRe: Display a image in picturebox [modified] Pinmemberkpuneeth722:01 23 Feb '10  
GeneralRe: Display a image in picturebox PinmvpStuart Dootson22:36 23 Feb '10  
GeneralRe: Display a image in picturebox Pinmemberkpuneeth70:53 24 Feb '10  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.5.120210.1 | Last Updated 10 Feb 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid