Jump to content

dooberry

Members
  • Posts

    133
  • Joined

  • Last visited

Everything posted by dooberry

  1. Ok,I'm a novice (I don't think I've put a reply in without this disclaimer), but could you use <xsl:for-each> to select the values of the points into a string somewhere in a stylesheet?I'm thinking something like <xsl:attribute name="points"><xsl:for-each select="gml:coord"><xsl:value-of select="gml:x" />,<xsl:value-of select="gml:y" /></xsl:for-each></xsl:attribute>If this works then I puff my chest out with pride, otherwise I hang my head in shame. Give it a try and let me know.Dooberry Firkin
  2. OK,I'm only a novice, but I'd lay out the structure differently.You have a book element, but the book element needs it's attributes changing to child elements.If you have a look at the W3Schools tutorials on xml, they say that the only attribute that should form part of the element tag is the id attribute.If you were to re-define your book so that it looked like this:<book id="unique reference in here"> <title /> <publisher /> <type />..</book> That way you can use xsl to extract all the information you need about the book without having to worry about using attributes.Other members will probably have better suggestions, but this might help ease your burden.Hope this helps.Dooberry
  3. OK,I'm only a novice, but I'd lay out the structure differently.You have a book element, but the book element needs it's attributes changing to child elements.If you have a look at the W3Schools best practices, it says that the only attribute that should form part of the element tag is the id attribute.If you were to re-define your book so that it looked like this:<book> <title />
  4. OK,I guess no-one hass had chance to read this yet so I'll out in the VBScript I am using to do the transform and someone can tell me where it's going wrong.Here it is:set xmldoc=CreateObject("Microsoft.XMLDOM") xmldoc.async=true xmldoc.load("Currentquote.xml") set xsldoc=CreateObject("Microsoft.XMLDOM") xsldoc.async=true xsldoc.load("Step1.xsl") Document.Write(xmldoc.transformnode(xsldoc))This is set as a non-procedural script in the header block of an HTML page, so the script generates the page on opening. This means that a client should be able to work on the data locally, and the submission is just sending the details of the XML document to the server datastore.If I was using ASP I would have had to use the Server.Createobject Method, but as I am expecting to work locally (for the time being) I can use plain old CreateObject. Is this where I am going wrong (my brain is starting to frazzle)?
  5. I'm trying to create a web page (duuh - as if you couldn't guess that!!) where I can use a single xml document as a temporary data store, while using various XSL sheets to navigate sections of the XML data.I've done a test on the first transform by linking it to the XML document directly :<?xml-stylesheet type="text/xsl" href="blah.xsl"?>In this case it works.When I try to do this dynamically in VBscript by using the code in the tutorial on XSL- EDIT XML, the transform works (I can see the layout) but it doesn't show the values from the XML data.Can anyone help?Dooberry
  6. I'm gonnna sound a bit ignorant here but I'm gonna say it anyway.XML is no more difficult than HTML, you just don't get away with mistakes.XSL is fantastic for laying out documents and can carry all the functionality of HTML and more (and you have to do it correctly which is a bonus). As a web novice I'm sure I'll find pitfalls sooner or later, but so far it seems pretty cool.I think every web programmer should try it.
  7. I'm trying to create a web page (duuh!!) where I can use a single xml document as a temporary data store, while using various XSL sheets to navigate sections of the XML data.I've done a test on the first transform by linking it to the XML document directly :<?xml-stylesheet type="text/xsl" href="blah.xsl"?>In this case it works.When I try to do this dynamically in VBscript by using the code in the section on XSL- EDIT XML, the transform works (I can see the layout) but it doesn't show the values that it shows when I use the direct link to the XSL document.Can anyone help?Dooberry
×
×
  • Create New...