XML question

This is a discussion on XML question within the Development forum part of the Software/Hardware category; I have a question from my course.. figure I'd ask you guys. from the following code: Code: <?xml version="1.0" ?> ...


+ Reply to Thread
Results 1 to 7 of 7

Thread: XML question

  1. #1
    ice.cream is offline Wannabe Member
    ice.cream is an unknown quantity at this point
    Join Date
    Apr 2007
    Posts
    18
    Downloads
    0
    Uploads
    0
    Rep Power
    3
    Reputation
    4

    XML question

    I have a question from my course.. figure I'd ask you guys.

    from the following code:

    Code:
    <?xml version="1.0" ?>
    <?xml-stylesheet type='text/xsl' href='sample.xsl'?>
    <Books>
    	<ItemInformation>
    		<ISBN>0131453491</ISBN>
    		<PersonalAuthor>Megginson, David 1964</PersonalAuthor> 
    		<Title>Imperfect XML</Title>
    		<Edition>3</Edition> 
    		<PublicationInformation>
    			Upper Saddle River
    		</PublicationInformation> 
    		<PhysicalDescription>xviii, 229 p. : ill. ; 24 cm.</PhysicalDescription> 
    		<GeneralNote>Sample</GeneralNote>
      		<SubjectTerm>Sample</SubjectTerm>
    		<Copy>
    			<Record id="1">
    				<Library>UOIT</Library>
    				<CallNumber>QA76.76.H94 M4392005</CallNumber>
      				<Copy>1</Copy>
      				<Material>Book-UOIT</Material>
      				<Location>On the shelf -3rd Floor</Location>
      				<DueDate>02-28-2006</DueDate>
      				<Note>Sample</Note>
      			</Record>
    		</Copy>
    	</ItemInformation>
    </Books>
    
    and if the following code is sample.xsl

    Code:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    
    <xsl:template match="Books">
    <html>
    	<body>
    		<h1><xsl:value-of select="ItemInformation/Copy/../Edition/.."/></h1>
    	</body>
    </html>
    </xsl:template>
    
    <xsl:template match="text()"/>
    
    </xsl:stylesheet>
    
    Why does the answer turn out to be:
    0131453491 Megginson, David 1964 Imperfect XML 3 Upper Saddle River xviii, 229 p. : ill. ; 24 cm. Sample Sample UOIT QA76.76.H94 M4392005 1 Book-UOIT On the shelf -3rd Floor 02-28-2006 Sample

    The problem I'm having is from "ItemInformation/Copy/../Edition/.."

    why would this code mean the whole thing?

  2. #2
    Ryan's Avatar
    Ryan is offline myspace.com/ryan_str0up
    Ryan is a glorious beacon of light Ryan is a glorious beacon of light Ryan is a glorious beacon of light Ryan is a glorious beacon of light Ryan is a glorious beacon of light
    Join Date
    Jul 2007
    Location
    Folsom, California
    Posts
    2,202
    Downloads
    22
    Uploads
    2
    Rep Power
    6
    Reputation
    480
    Because <TAG HERE> Isn't Read.

    Well It Is Read, But It Doesn't Show.




  3. #3
    ice.cream is offline Wannabe Member
    ice.cream is an unknown quantity at this point
    Join Date
    Apr 2007
    Posts
    18
    Downloads
    0
    Uploads
    0
    Rep Power
    3
    Reputation
    4
    wat do you mean..? which part isn't read?

  4. #4
    Ryan's Avatar
    Ryan is offline myspace.com/ryan_str0up
    Ryan is a glorious beacon of light Ryan is a glorious beacon of light Ryan is a glorious beacon of light Ryan is a glorious beacon of light Ryan is a glorious beacon of light
    Join Date
    Jul 2007
    Location
    Folsom, California
    Posts
    2,202
    Downloads
    22
    Uploads
    2
    Rep Power
    6
    Reputation
    480
    <ISBN>0131453491</ISBN>
    <PersonalAuthor>Megginson, David 1964


    This Is Why The Answer Is

    0131453491Megginson, David 1964




  5. #5
    ice.cream is offline Wannabe Member
    ice.cream is an unknown quantity at this point
    Join Date
    Apr 2007
    Posts
    18
    Downloads
    0
    Uploads
    0
    Rep Power
    3
    Reputation
    4
    oh yea i know that, but the question is mostly from the sample.xsl

  6. #6
    Ryan's Avatar
    Ryan is offline myspace.com/ryan_str0up
    Ryan is a glorious beacon of light Ryan is a glorious beacon of light Ryan is a glorious beacon of light Ryan is a glorious beacon of light Ryan is a glorious beacon of light
    Join Date
    Jul 2007
    Location
    Folsom, California
    Posts
    2,202
    Downloads
    22
    Uploads
    2
    Rep Power
    6
    Reputation
    480
    I Don't Know What The Fk That Is, It Could Be Trying To Get To A Directory, But Putting ... Would Block It =/




  7. #7
    ice.cream is offline Wannabe Member
    ice.cream is an unknown quantity at this point
    Join Date
    Apr 2007
    Posts
    18
    Downloads
    0
    Uploads
    0
    Rep Power
    3
    Reputation
    4
    nvm i got it, thx dude
    Last edited by ice.cream; 03-04-2008 at 04:26 AM.

+ Reply to Thread

Similar Threads

  1. Best HTML, PHP, and XML Editors
    By Hallowsend in forum Software
    Replies: 0
    Last Post: 12-28-2007, 04:10 PM
  2. Question about DB AIDS v1.1 3rd Release
    By Rkerin in forum WoW Private Server Info & Help
    Replies: 8
    Last Post: 12-24-2007, 08:06 PM
  3. Game Limit Question
    By Nexusg7 in forum Warcraft 3 Support
    Replies: 10
    Last Post: 09-28-2007, 10:27 PM
  4. just a question
    By Boemer in forum Warcraft 3 Support
    Replies: 6
    Last Post: 03-07-2007, 10:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts