Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20

Thread: XML/XSL

  1. #1
    Junior Member
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    19
    Member #
    13406
    Hi.
    I have a XML file. Its an Exif of a Jpg file. Im trying to display the metadata of the jpg on the same page as the image. I use XSL to display the 'exif' image stats on a webpage. However the XML values seem to be written in a different format..
    For example... insted of displaying the value of F/6 beside F/Number.. the browser shows the raw data like in the <Value> tag in the code below.
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="top.xsl"?>
    <property Tag="33437">
    <name>F Number</name>
    <length>8</length>
    <type>5</type>
    <Value>3C0000000A000000</Value>
    </property>
    As you can see its a simple XML file with a styleSheet attached to it.

    If its not too much to ask, i hope someone can PLEASE show me how to make the browser display this value in the proper way. The way you would see it if you right clicked the Jpg on your desktop.
    Thank in advance.
    Let the rabbits wear glasses.

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    XSL is supported badly at best and not at all at worst on web browsers nowadays, from what I recall. XML, in general, is a dangerous bet. Any reason why you can't use the XSLT transform on the server instead of on the client?

  4. #3
    Junior Member
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    19
    Member #
    13406
    Wouldnt i get the same problem with xslt ?
    Let the rabbits wear glasses.

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    My point is to use XSLT to do the conversion server-side, once, instead of sending the XML with an XSL stylesheet to the client, since handling of XML+stylesheets isn't exactly reliable nowadays.

  6. #5
    Junior Member
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    19
    Member #
    13406
    Either way i dont know how to do it with XSL so XSLT dont help either... Isnt there a way to convert this with xsl?
    Or atleast findout what 3C0000000A000000 would be so i can change the text inside the XML.
    Let the rabbits wear glasses.

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Ooh, gotcha. In which case you probably need to look at the EXIF specification. exif.org seems to be a fairly good resource.

  8. #7
    Junior Member
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    19
    Member #
    13406
    i noticed... on wikipedia when u upload a jpg the picture page automaticly displays the metadata of the image. on the same page..... And i wonder how they get the browser to automaticly ditect and display the data..
    http://en.wikipedia.org/wiki/Image:P6190202.JPG SCROLL down to the bottom of this page.. and see what im talkin about....they have a little table on the bottom with the metadata... I can besicly do the same thing exept for the value tag... I dno if that value is HEX or what..... Im sure the browser can automaticly do the conversion JUST HOW....... LMAO... Thanks for all your help.... Exif.org dont really have much help on web design.. the place looks like a ghost town LMAO.. thanks again...
    P.S. Ive also tried using HTML to display the image data and it WORKS.. but i still get the same problem with the value tag..grrrrr.....
    Let the rabbits wear glasses.

  9. #8
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Well... No, exif.org doesn't have anything on web design, but what you're doing has nothing to do with web design, it has to do with parsing an EXIF tag, which is something covered by the EXIF spec (which I don't know), which is what exif.org has information on. Exif.org will probably tell you how and what information is encoded in that field. Alternatively, you can go to http://wikipedia.sf.net/ and look at MediaWiki's source code to see how they extract the data from the image file. I'm guessing they probably use ImageMagick or some other external utility, but that might not be the case.

  10. #9
    Junior Member
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    19
    Member #
    13406
    i dno anymore..lol. I tried their software but its got all kinds of bugs...AAHHHH !!!!.
    thanx anyway. :thumbsup:
    Let the rabbits wear glasses.

  11. #10
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    I made my company website entirely with XML and XSL: http://www.grassrootsamerica.com

    XML content: http://www.grassrootsamerica.com/xml/index.xml
    XSL-T transformer: http://www.grassrootsamerica.com/xsl/index.xslt
    Base XSL-T template: http://www.grassrootsamerica.com/xsl/base.xslt

    Then, using JSP / Java / Xalan / Xerces I transform the XML into HTML on the server.

    I also made another component that uses FOP and XSL-FO to transform the same XML data source into a PDF, but haven't yet released that.

    Hope that helps a bit...


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:46 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com