Thank You Scott, I now understand what I was missing. On Fri, Mar 5, 2010 at 3:43 PM, Scott Henninger <[email protected]>wrote:
> Hello Andy, and welcome! > > <Traversing seems easy but the other tags which has list looks > challenging> > > One nice thing about XML is that it is very regular. Everything is in > the tree, including data and attributes. All of this is captured in > Semantic XML. > > In your case the problem is that you're not selecting a match for > <LastName>, etc. in the "?AuthorValid composite:child ?LastName.", so > you get all of them. To get this you can use the same pattern that > was used to get the others - ask for a member of the class and match > that. So for the last name match, you'd use: > > ?AuthorList a :AuthorList. > ?article composite:child ?AuthorList. > ?AuthorList composite:child ?AuthorValid. > ?LastName a :LastName . > ?AuthorValid composite:child ?LastName. > ?LastName composite:child ?LastNameNode. > ?LastNameNode sxml:text ?LastNameValue. > > Same kind of pattern for the ForeName and Initials. > > -- Scott > > On Mar 5, 12:57 pm, Andy <[email protected]> wrote: > > Hi All, > > > > I am new to this group and I am also working on something similar XML > > and RDF files. Well lot of information is provided and seems quite > > helpful. > > > > Well to add up to the questions.Traversing seems easy but the other > > tags which has list looks challenging. > > > > Ex: In the same file Publisher.xml there are Article List, History, > > PublicationTypeList, AuthorList and others. > > So for a record there can be more than 1 author, every record has > > different values in Author list. So the same traversing will be > > helpful? > > I don't think its displaying the desired output. > > > > SELECT ?ISSNValue ?LastNameValue ?ForeNameValue ?InitialsValue > > WHERE { > > ?article a :Article. > > ?AuthorList a :AuthorList. > > ?article composite:child ?AuthorList. > > ?AuthorList composite:child ?AuthorValid. > > ?AuthorValid composite:child ?LastName. > > ?LastName composite:child ?LastNameNode. > > ?LastNameNode sxml:text ?LastNameValue. > > > > ?AuthorValid composite:child ?ForeName. > > ?ForeName composite:child ?ForeNameNode. > > ?ForeNameNode sxml:text ?ForeNameValue. > > > > ?AuthorValid composite:child ?Initials. > > ?Initials composite:child ?InitialsNode. > > ?InitialsNode sxml:text ?InitialsValue. > > > > ?ISSN a :ISSN . > > ?article composite:child ?journal. > > ?journal composite:child ?ISSN. > > ?ISSN composite:child ?ISSNNode. > > ?ISSNNode sxml:text ?ISSNValue. > > > > } > > > > Is there anything I am missing ? > > > > Thanks, Andy > > > > On Feb 21, 11:22 pm, sue <[email protected]> wrote: > > > > > On Sun, Feb 21, 2010 at 11:14 PM, sue <[email protected]> wrote: > > > > hi, > > > > I am still new to this TBC/Semantics and Sparql, > > > > and I am working on conversion of XML documents and export it to CSV > > > > or TXT > > > > > > I open the XML file (sample attached) using the Semantic XML > Documents > > > > and then I can see all the classes and instances, > > > > the process flow will be selecting a file (later root folder and then > > > > iterating it) and then converting it to spreadsheet and hten > exporting > > > > it to text/xls. > > > > > > while converting it to spreasheet I am finding hard time to write the > > > > sparql query for selecting the tags. > > > > > > Example is a sample from the google: > > > > SELECT * > > > > WHERE { > > > > ?var dcterms:abstract ?abstract . > > > > ?var dcterms:author ?author. > > > > ?var dc:title ?title . > > > > > > } > > > > I am not sure how this works. I mean how do I know what are the tag > > > > types (dcterms, dc, prism) > > > > > > Pls guide me. > > > > > Thanks > > > > > Publisher.xml > > > 39KViewDownload > > -- > You received this message because you are subscribed to the Google Groups > "TopBraid Composer Users" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<topbraid-composer-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/topbraid-composer-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/topbraid-composer-users?hl=en.
