Click here to Skip to main content
15,907,687 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Assign DTD to XML Document Pin
Bash3-Nov-02 18:52
Bash3-Nov-02 18:52 
General(XML4C) DOMParser constructor crash Pin
Ravi Bhavnani1-Nov-02 12:10
professionalRavi Bhavnani1-Nov-02 12:10 
GeneralRe: (XML4C) DOMParser constructor crash Pin
Michael A. Barnhart2-Nov-02 2:11
Michael A. Barnhart2-Nov-02 2:11 
GeneralRe: (XML4C) DOMParser constructor crash Pin
Ravi Bhavnani3-Nov-02 9:13
professionalRavi Bhavnani3-Nov-02 9:13 
GeneralRe: (XML4C) DOMParser constructor crash Pin
Michael A. Barnhart3-Nov-02 9:34
Michael A. Barnhart3-Nov-02 9:34 
GeneralRe: (XML4C) DOMParser constructor crash Pin
Ravi Bhavnani3-Nov-02 9:42
professionalRavi Bhavnani3-Nov-02 9:42 
GeneralXML Database on Client w/C# Pin
GregGacura31-Oct-02 12:37
sussGregGacura31-Oct-02 12:37 
Generalcalling all XML/XSL XPath gurus Pin
Marc Clifton31-Oct-02 9:37
mvaMarc Clifton31-Oct-02 9:37 
This is a follow up on my "how do I do a join" question. I think I'm about to be screwed by .NET, because this is beginning to hurt so much.

Here's the problem. I created a database schema and data using .NET's DataSet:

dataSet.WriteXml(fn, XmlWriteMode.WriteSchema);


And it dutifully creates an XML document, with the data looking like this (as an example):

(BTW, how do you embed XML as source, so it doesn't get parsed, which is why all my example here have the opening '<' MISSING!!!):

PART>
    ID>1001/ID>
    PARTNUMBER>101045/PARTNUMBER>
    DESC>FILTER, FUEL #2010SM RACOR/DESC>
  /PART>
  PART>
    ID>1002/ID>
    PARTNUMBER>101050/PARTNUMBER>
    DESC>FILTER, #2020SM RACOR/DESC>
  /PART>


Now, I've got an XSL translation that looks something like this:

?xml version="1.0" encoding="UTF-8" ?>
xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
xsl:template match="/">
xsl:for-each select="//PART[@*]">
xsl:value-of select="ID"/>
xsl:value-of select="PARTNUMBER"/>
/xsl:for-each>
/xsl:template>
/xsl:stylesheet>


as a test because it appears that fields like ID are not considered to be an attribute. (This select doesn't return any records, but a //PART[not(@*)] does return records. Instead, it seems that ID is an element (I hope I have my XPath terminology right here).

So, when I actually do an XPath query like:
xsl:for-each select="//PART[@ID='1001']">


I get no records back.

Argh! Mad | :mad: Can I do this on the XML file that DataSet created???

Thanks a million!

Marc


Help! I'm an AI running around in someone's f*cked up universe simulator.
GeneralRe: calling all XML/XSL XPath gurus Pin
Christian Graus31-Oct-02 10:22
protectorChristian Graus31-Oct-02 10:22 
GeneralRe: calling all XML/XSL XPath gurus Pin
Marc Clifton31-Oct-02 10:26
mvaMarc Clifton31-Oct-02 10:26 
GeneralRe: calling all XML/XSL XPath gurus Pin
Christian Graus31-Oct-02 10:49
protectorChristian Graus31-Oct-02 10:49 
GeneralRe: calling all XML/XSL XPath gurus Pin
Michael Dunn31-Oct-02 13:58
sitebuilderMichael Dunn31-Oct-02 13:58 
GeneralForEx Data Pin
shane3931-Oct-02 8:27
shane3931-Oct-02 8:27 
GeneralRe: ForEx Data Pin
Ravi Bhavnani2-Nov-02 4:42
professionalRavi Bhavnani2-Nov-02 4:42 
GeneralXML & VC++ Pin
chepuri_uk29-Oct-02 18:12
chepuri_uk29-Oct-02 18:12 
GeneralRe: XML & VC++ Pin
ian mariano30-Oct-02 1:47
ian mariano30-Oct-02 1:47 
GeneralRe: XML & VC++ Pin
Stephane Rodriguez.30-Oct-02 1:53
Stephane Rodriguez.30-Oct-02 1:53 
GeneralRe: XML & VC++ Pin
Christian Graus30-Oct-02 10:38
protectorChristian Graus30-Oct-02 10:38 
GeneralRe: XML & VC++ Pin
Ravi Bhavnani2-Nov-02 4:48
professionalRavi Bhavnani2-Nov-02 4:48 
Questiontable joins--how to??? Pin
Marc Clifton29-Oct-02 12:31
mvaMarc Clifton29-Oct-02 12:31 
AnswerRe: table joins--how to??? Pin
Michael A. Barnhart29-Oct-02 13:53
Michael A. Barnhart29-Oct-02 13:53 
AnswerRe: table joins--how to??? Pin
Paul Watson30-Oct-02 2:53
sitebuilderPaul Watson30-Oct-02 2:53 
GeneralRe: table joins--how to??? Pin
Marc Clifton30-Oct-02 10:36
mvaMarc Clifton30-Oct-02 10:36 
AnswerRe: table joins--how to??? Pin
Philip Fitzsimons31-Oct-02 3:04
Philip Fitzsimons31-Oct-02 3:04 
GeneralRe: table joins--how to??? Pin
Marc Clifton31-Oct-02 3:22
mvaMarc Clifton31-Oct-02 3:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.