Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Phil Hobgen

@Phil Hobgen
About
Posts
31
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • XSL GetDate function ?
    P Phil Hobgen

    Hi, I think the only way to do this is to pass in the date and pick it up in your stylesheet as a global parameter using xsl:param. The way you pass parameters in to the stylesheet is processor specific, so for instance in .Net there is a XsltArgumentList class. Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml question

  • Process XML from inside XML
    P Phil Hobgen

    Hi, Having a bit more of a think.... If you are working to a schema, and the format of the xml currently in Value is not clearly definable then, if you can change the schema, you could just use an xs:any element (with maxOccurs="unbounded") to define the nested xml but place it within the Variable element. If there is no schema then you could just move the xml as above anyway, with no worries about schema changes. So there is no need for a CDATA section really. Of course in either case you may be exchanging this data with someone else, who you may or may not be able to get agreement with :) If you can't move the 'encoded' xml, and presuming it is all properly escaped, I think maybe the place to start is to select the Value attribute into a variable. This would contain a tree fragment that you can perform all the usual xslt stuff on. For instance you could set up a template with a match of ALL_RESULTS, you could call the template with apply-templates with a select on the variable you have created. If that doesn't work then perhaps you could pass the variable into a param of the template and process it that way. I dont think it matters that the source for the variable is text containing < as opposed to < etc, the xslt processor can't tell the diference, I think :-D Sorry I dont have time to test out the theory - I would be interested to hear how you get this to work.. Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml help tutorial

  • Process XML from inside XML
    P Phil Hobgen

    Hi, dnh wrote: Didn't he write "the document contains xml encoded inside the xml". I'd guess it is escaped. But my English is self-thought ( in computer terminology), so word "encode" has only one meaning to me ... You're probably right. :doh: I must admit to having been somewhat surprised to see xml like that. dnh wrote: other ideas? Not really. If the xml structure can be changed then a CDATA section sounds like just the right approach. Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml help tutorial

  • Process XML from inside XML
    P Phil Hobgen

    Hi, As it appears here, your xml is not valid. The "<" character cannot appear within an atribute value, unless you escape it as < Also you have " charaters embedded within an attribute value that uses the same " character to enclose the attribute value, you could escape the inner quotes as " You need to fix the xml before you can look at the xslt. Are you able to change the xml structure? If the attribute must contain xml, then you will have to escape the appropriate characters, after that you will be able to use the value-of element to retrieve the escaped xml. At that point, I guess you would need to 'un-escape' it. Sounds complicated... Good Luck, Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml help tutorial

  • Display Image from XML source
    P Phil Hobgen

    Hi, If you are saying that you have some xml that is a bit like either : <sometag>url('http://www.somewebsite/image/myimage.jpg')</sometag> or : <sometag someattr="url('http://www.somewebsite/image/myimage.jpg')" /> If you are using XSLT then you could trim the outer parts of the string using a combination of string functions from: string-length(), substring(), substring-before(), and substring-after() or maybe just two consecutive calls to translate() would do it. You could just output the value of whats left over into the src attribute This probably isn't very efficient (string functions), if you have to do it a lot, but if thats whats in the xml you might have to resort to something like this. Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL html xml

  • Page Header/Footer in HTML
    P Phil Hobgen

    Hi, This is really something that you probably need to do using CSS, with an alternate stylesheet - CSS2 has some support for print layout and there are moves to improve on this, but I'm not sure what the current browsers support. You could do it with XSLT (if your source is XML), and generate different pages for browsing/printing, but this would be v. complex I suspect. You could even use XSLF for generating a PDF for strict layour printing, I would think this can get even more complex. Unless you're really in to XSL .... I think your best bet is to have a search for articles on css printing. Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL html tutorial

  • How do I add a DOCTYPE declaration in XML using MSXML in Visual C++?
    P Phil Hobgen

    Hi, I think what you want is the IXMLDOMDocumentType interface which inherits from an IXMLDOMNode so you should be able to deal with it like any other node. Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL c++ help question xml

  • Print Values in XSLT
    P Phil Hobgen

    Hi, This doesn't seem like a very elegant solution. I'm sure there must be a better way, but I couldn't get there :( Hope this helps.

    <?xml version="1.0" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <xsl:variable name="unique-years" select="/ROOT/CAR/SALES[not(@Year=preceding::*/@Year)]/@Year" />
    <xsl:variable name="unique-carnames" select="/ROOT/CAR[not(@Name=preceding::*/Name)]/@Name" />
    <html>
    <body>
    <table>
    <tr>
    <td> </td>
    <xsl:for-each select="$unique-carnames">
    <xsl:sort select="." />
    <td><xsl:value-of select="." /></td>
    </xsl:for-each>
    </tr>
    <xsl:for-each select="$unique-years">
    <xsl:sort select="." />
    <tr>
    <xsl:variable name="this-year" select="."/>
    <td><xsl:value-of select="$this-year" /></td>
    <xsl:for-each select="$unique-carnames">
    <xsl:sort select="." />
    <xsl:variable name="this-car" select="."/>
    <td><xsl:value-of select="/ROOT/CAR[@Name=$this-car]/SALES[@Year=$this-year]" /></td>
    </xsl:for-each>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>

    Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml sales help

  • A beginner question
    P Phil Hobgen

    Hi, XML can be used anywhere where you can use text. You can pass it around in files, or over the web. SOAP is a protocol that uses XML for sending/receiving to call methods, this doesn't sound like what you want. To do the binary encoding take a look at base64 encoding. Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL question xml help tutorial learning

  • XSLT Question
    P Phil Hobgen

    Hi, This should get you started - it's not in a table, but you should get there from here<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <html> <body> <h1>Cricket</h1> <xsl:apply-templates select="CRICKET/TEAM"/> </body> </html> </xsl:template> <xsl:template match="TEAM"> <h2><xsl:value-of select="@Name" /></h2> <xsl:apply-templates select="PLAYER"/> </xsl:template> <xsl:template match="PLAYER"> <h3><xsl:value-of select="." /></h3> </xsl:template> </xsl:stylesheet>
    Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml help question

  • XMI
    P Phil Hobgen

    Hi, A starting point would be the OMG web site generally, and maybe this page http://www.omg.org/technology/xml/index.htm[^] in particular. From what I know, it's just an XML language for describing UML models so they can be exchanged between different vendors modelling tools. It can't take the place of UML as it is just a standard language for describing UML models. As for its' future - personally I can't see much call for it in the real world, except maybe for large open source projects where a number of different UML editors might be used by different contributors. From my experience organisations tend to standardise on the use of a single modelling tool, so unless they want to exchange models externally they would have no call for XMI. I have no real idea, but perhaps it is possible be that certain vendors would like to use XMI to store the models generated by their modelling tools, however xml would seem to be an extremely inefficient way to store this data. A bit like storing very large spreadsheets as XML, only worse! It would be interesting to hear what started your interest in XMI? Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL question tools xml

  • A beginner question
    P Phil Hobgen

    Hi, The best place to start is with some questions : 1) What's your development environment? 2) Is there an existing XML Schema that you need to comply with? If you are exchanging the data with an external system, a schema is useful as a definition of the exchanged data format. Alternatively you may just be able to agree a simple xml structure. 3) Do you need to enclose the binary data in the xml, or could you use a url within the xml to indicate where the binary data can be retrieved from? If you need to enclose the binary data then you will need to encode it, as xml does not allow binary data. Note that this encoding will expand the size of the binary data, and hence the size of your xml. 4) When you transmit via TCP/IP do you mean HTTP, a web service, or some other standard protocol or just from port to port using some 'informal' protocol? A good link to bookmark is http://www.zvon.org[^] Good Luck! Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL question xml help tutorial learning

  • Processing Instruction
    P Phil Hobgen

    Hi, I'm not sure how you are transferring the xml to the browser. To work out if the problem is with the XmlDocument or with the transfer of the xml you could try a call to Save("SomeDirOnTheServer\\SomeFileName.xml"); Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml csharp data-structures security debugging

  • Processing Instruction
    P Phil Hobgen

    Hi, I've never seen the PI anywhere but before the root element. So that should be correct. Are you sure that "wsinfo.xsl" is located relative to the url that returns the xml? When you say the PI is not displayed in IE, do you mean in the browser or in the "View Source" notepad? The xml shouldn't be seen in the browser, you should see the result of the transformed xml. Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml csharp data-structures security debugging

  • Problem while Working with XmlValidatingReader!!!!!
    P Phil Hobgen

    Hi, Sorry, I haven't started working with it yet. I'd merely made myself a note that XmlValidatingReader will have to be replaced when I move some existing code to v2.0 Good Luck Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml help csharp database dotnet

  • Problem while Working with XmlValidatingReader!!!!!
    P Phil Hobgen

    Hi, The XmlValidatingReader class is obsolete in v2.0. You can read about validating xml in v2.0 here: http://msdn2.microsoft.com/library/hdf992b8.aspx[^] Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL xml help csharp database dotnet

  • XmlTextWriter 101
    P Phil Hobgen

    Hi, There isn't an XmlTextWriter constructor that takes a FileInfo as a parameter. There's a choice of three constructors, it looks like you probably want to use this one: public XmlTextWriter(string filename, Encoding encoding); Cheers Phil Hobgen barbari.co.uk Southampton, UK

    XML / XSL csharp c++ xml help tutorial

  • Problem while Working with XmlValidatingReader!!!!!
    P Phil Hobgen

    Hi, The XmlValidatingReader class is obsolete in v2.0. You can read about validating xml in v2.0 here: http://msdn2.microsoft.com/library/hdf992b8.aspx[^] Cheers Phil Hobgen barbari.co.uk Southampton, UK

    C# xml help csharp database dotnet

  • about computer in a domain
    P Phil Hobgen

    Hi, Put a textbox (multiline) and a button on a form, try this button click handler, as a start:

    private void button1_Click(object sender, System.EventArgs e)
    {
    DirectoryEntry de = new DirectoryEntry("LDAP://myserver.mydomain");
    DirectorySearcher ds = new DirectorySearcher(de);
    ds.Filter = ("(objectClass=computer)");
    foreach(SearchResult res in ds.FindAll())
    {
    textBox1.AppendText(res.GetDirectoryEntry().Name + System.Environment.NewLine);
    }
    }

    Cheers Phil Hobgen barbari.co.uk Southampton, UK

    ASP.NET tutorial help

  • Refresh Page Problem
    P Phil Hobgen

    Hi, You can do this with the html <object> elements. Set the data attribute to the url of an embeded page, set the type attribute to "text/html", and you'll need to set the width and height attributes as well. Then the embeded page(s) can use meta refresh without affecting the whole page. Cheers Phil Hobgen barbari.co.uk Southampton, UK

    ASP.NET help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups