Both Topic Maps and RDF are popular semantic web standards designed for machine processing of web documents. Since these representations were originally created for different purposes, they have conceptual differences in their data models, and therefore have different tools to parse, store, and query them. However, there are more tools to handle RDF data than those existing for Topic Maps. Our approach is to map Topic Maps to a view expressed in RDF and then query this view by the RDF query language SPARQL. To achieve this, a generic conceptual schema of Topic Maps is defined using a functional data model. Based on the conceptual schema of Topic Maps, an automatic mapping from Topic Maps to the RDF data model is developed. The mapping provides a general view of any Topic Map data in terms of RDF that can be queried using SPARQL. Query rewriting techniques based on partial evaluation enable realistic performance.