Skip to content

XML / XSL

Discussions on XML and related technologies

This category can be followed from the open social web via the handle xml-xsl@forum.codeproject.com

2.6k Topics 6.8k Posts
  • XML and Binary Data

    question com sysadmin xml help
    3
    0 Votes
    3 Posts
    11 Views
    K
    In my current application, I am using SQLXML to access my data (including JPEG images) within SQL Server 2000. By using a mapping-schema to explicitly map the datatypes (from "image" to "base64binary"), the image is automatically encoded and decoded for me.
  • Embed JavaScript into XSL

    javascript tools xml
    3
    0 Votes
    3 Posts
    10 Views
    J
    Thanks - I'll give it a try. Julia
  • Handling same element with different types.

    question xml database tutorial
    2
    0 Votes
    2 Posts
    7 Views
    M
    This schema allows the attribute of the Group element names Type to be either LineGroup or BitGroup. To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli
  • Two questions

    xml csharp html database dotnet
    3
    0 Votes
    3 Posts
    8 Views
    Richard DeemingR
    Thanks for replying. I think I've solved the first problem - I needed to set the encoding to "ISO-8859-1" instead of "UTF-8". Now the only problem is to get the XMLHTTP object to recognize the correct code-page for non-XML documents. As for XPath, I kind of suspected that this was the case. The other solution I found, which will only work for some XML documents, is to use the DataSet object to load the XML. Hopefully, this will continue to be supported as .Net evolves, regardless of the standards implemented. Cheers, Richard
  • XML Logging (Your thoughts)

    html xml question discussion
    5
    0 Votes
    5 Posts
    14 Views
    D
    We have done something similar, and for the first time files, if you check their existance before opening them, you can write out the xml header for a new file. You can also write out any trailer information, and if it is static, then when you open the file, you can re-position the file pointer (using fseek) to be that number of characters back from the end, write out your new data, and rewrite the static (ie, fixed/known length) trailer. It's a little clumsy, but it helps to know that you can re-position the file pointer. Dave "You can say that again." -- Dept. of Redundancy Dept.
  • IE 6 appendChild HELL

    xml help question
    7
    0 Votes
    7 Posts
    21 Views
    C
    I am still able to traverse nodes, it's when I call appendChild, and then not always. I did a full reinstall, and we're fairly sure it's not related to IE6 ( although I've not reinstalled it ), but the general death of my machine. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
  • Space in XML

    xml
    4
    0 Votes
    4 Posts
    13 Views
    M
    Depending on which version of MSXML you have whitespace defaults are different. In VC++ the following line will preserve the whitespaces if called prior to loading the file. hr = pXML->put_preserveWhiteSpace(VARIANT_TRUE); To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli
  • Types in Schema

    csharp database visual-studio regex xml
    4
    0 Votes
    4 Posts
    14 Views
    M
    Jamie, I really have not done much with patterns. But if I am reading the spec right, you need a small 'w' not a capital 'W'. http://www.w3.org/TR/xmlschema-2/#rf-pattern You have to have a slightly different setup for Visual Studio as mine lets me type anything in with no error checking. To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli
  • Outputting a !DOCTYPE declaration from an XSL stylesheet

    xml question learning html com
    21
    0 Votes
    21 Posts
    86 Views
    P
    Domenic [_Geek_n] wrote: But... this just seems kind of wrong... but it works... but it seems wrong... but... so, what do you think? It works, just like using pantyhose to fix a broken fan-belt in a car works. However as soon as you can you should get a new proper fan-belt, right? I had a crushing deadline which forced me to use the xsl:text method to output the DOCTYPE. However what happened was that when a third party tried to programatically query my XSL documents to gather some info for an integration project they failed to get the DOCTYPE. I eventually re-coded my XSL docs to use the output method. So the answer is; Yes it works but don't do it if you can avoid it. Your XSL docs will be technically better and easier to maintain in the future if you use the proper output method. regards, Paul Watson Bluegrass Cape Town, South Africa The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge "Reports of my death have been greatly exaggerated."
  • Newbie needs help with a schema.

    xml help database tools regex
    3
    0 Votes
    3 Posts
    11 Views
    N
    Thanks for the reply! Unfortunately the code is at work so I cannot check it to see if that's what I did. I was sure I put the / on the end but who knows. It is the weekend so I'll worry about it on monday.:) nay
  • Using XSL to filter the data from XML

    xml database help question
    4
    0 Votes
    4 Posts
    14 Views
    M
    I'm guessing your XML looks something like this: <cards> <card><CardType>1</CardType> <data> <record> <field1> <CardLicenceOption>1</CardLicenceOption> <CardLicenceOptionDescription>Credit</CardLicenceOptionDescription> </field1> <field1> <CardLicenceOption>2</CardLicenceOption> <CardLicenceOptionDescription>Charge</CardLicenceOptionDescription> </field1> </record> </data> </card> <card><CardType>3</CardType> <CardOptionParent1>1</CardOptionParent1> <CardOptionDescription>Cash</CardOptionDescription> </card> </cards> It looks like you're using incorrect paths to access your XML elements. The following XSLT should work: <xsl:for-each select="//card"> <tr><td width="50%">Credit Card Option1 xsl:choose <xsl:when test="CardType=3"> <xsl:element name="select"> <xsl:attribute name="name">D2</xsl:attribute> <xsl:element name="option"> <xsl:attribute name="value"> <xsl:value-of select="CardOptionParent1" /> </xsl:attribute> <xsl:value-of select="CardOptionDescription" /> </xsl:element> </xsl:element> </xsl:when> <xsl:when test="CardType=4"> <xsl:element name="select"> <xsl:attribute name="name">D2</xsl:attribute> <xsl:element name="option"> <xsl:attribute name="value"> <xsl:value-of select="CardOptionParent2" /> </xsl:attribute> <xsl:value-of select="CardOptionDescription" /> </xsl:element> </xsl:element> </xsl:when> xsl:otherwise <xsl:element name="select"> <xsl:attribute name="name">D2</xsl:attribute> <xsl:for-each select="data/record/field1"> <xsl:element name="option"> <xsl:attribute name="value"> <xsl:value-of select="CardLicenceOption"/> </xsl:attribute> <xsl:value-of select="CardLicenceOptionDescription" /> </xsl:element> </xsl:for-each> </xsl:element> </xsl:otherwise> </xsl:choose> </td></tr> </xsl:for-each>
  • XML with special characters

    xml help question
    5
    0 Votes
    5 Posts
    16 Views
    S
    You might want to take a look at the W3C's Blueberry spec on character sets in XML. Cheers, Simon "Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
  • Microsoft Sharepoint Portal

    sharepoint help tutorial question
    4
    0 Votes
    4 Posts
    13 Views
    M
    I haven't worked very intensively with Sharepoint, but from the User's help it seems you have to do the following: 1) In Windows Explorer, expand your workspace (under My Network Places) 2) Right-click on the Documents folder and select Properties 3) Select the Approval tab, and fill in the details
  • C++ msxml tutorials

    c++ html com data-structures xml
    10
    0 Votes
    10 Posts
    30 Views
    T
    Todd.Harvey wrote: I just want to get data out like it was Access or a *.ini file, or a flat file", and the XML DOM sometimes seems to make what should be easy , difficult Now that's an understatement :) Todd.Harvey wrote: Your tutorial was very easy to understand and helpful Thanks! I'll give some thought to your other remarks as you might be onto something there... Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
  • Displaying TIF files

    question html design xml help
    3
    0 Votes
    3 Posts
    11 Views
    D
    Michael, Thanks for your comments. I was able to finally figure out what was going on after much research, reading, testing, and frustration. Here's a summary, which may be of help to others. Web browsers (IE and Netscape Navigator, and apparently on both PCs and Macs) are not able to view TIFF files as a native format (like for BMP, JPG, and GIF). They all require help, either from a TIFF plugin for IE, or "helper applications" for NN. The Alternatiff product is a free plugin so that IE can display TIFF files. The other option, though, is that IE (and I'm assuming NN also) uses the file associations to initiate the proper program to display files that IE does not recognize, such as .xls Excel spreadsheets or .doc Word files. With html links to those files, the corresponding app loads the linked file and displays it in the browser. This is also seen frequently with .pdf files when Adobe Acrobat starts up. This should have worked on my machine for TIFF files, as when I double click on a file from the desktop, the Imaging For Windows application (either from Wang or Kodak) started up with the file displayed. But, it was not working for the same file in an html href link. The problem turned out to be two entries in the registry, underneath the Software/Internet Explorer/Plugins path ... one entry for tif and one for tiff. Both were there, but had no values. What this was causing, therefore, was IE to believe that there was a plugin installed for tif/tiff files, and that it should use that plugin to display the file in the browser window. Since the plugin entries were empty, IE didn't have an application to use, so it displayed an empty image. When I deleted those two entries in the registry, IE could find no plugin and defaulted to the file associations, as expected. Dave "You can say that again." -- Dept. of Redundancy Dept.
  • child nodes

    xml
    5
    0 Votes
    5 Posts
    16 Views
    T
    thanks much, good demo, it does apply, and the comments below it were helpful too.
  • SOAP Newbie

    xml csharp sharepoint wcf com
    3
    0 Votes
    3 Posts
    10 Views
    T
    Thanks Michael! Michael A. Barnhart wrote: Take Care and when should I start looking for your book a the stores? Inside C# should be in the stores next week!! Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
  • XSLT to write links

    xml
    5
    0 Votes
    5 Posts
    19 Views
    A
    Paul Watson wrote: The key is templates. I used to hate them and thought they were these daft, never used bits of XSL. Until I figured out how they worked and went "oooohh yes!" :omg: :omg: I've never used XSLT for XML->HTML, but with XML->XML, templates are the god you bow down to and pray. It boggles my mind the thought of NOT using template matching in XSLT.:omg: :omg:
  • XML,Oracle+sqlserver integration

    database sql-server oracle sysadmin xml
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Is this a bug of Internet explorer?

    xml help html tutorial question
    2
    0 Votes
    2 Posts
    7 Views
    M
    Can you provide an example of the XML? Also, in what way do the anchors not work?