dcmiltown
01-11-2010, 09:23 PM
I'm very new to XML and I'm looking for a good single source format to export to both PDF and HTML. My boss suggests Word. I'd like to not do that.
Essentially I have a product catalog that I need to be able to sort the data by category / product / etc. My first task, and what I'd like help on, is figuring out how to put in a topic / description into the XML format.
The end result needs to look something like this:
Course Name: Course Title goes here
Length of Course: # of days in course
Overview: This is an overview of the course.
Prerequisites: These are the prerequisites.
Topics:
Topic 1
SubTopic
SubTopic
Sub Sub Topic
Topic 2
Sub Topic
Sub Sub Topic
Sub Sub Topic
etc...
Essentially, I am confused on what the proper markup should be for an ordered list. I need topic 1 to be the first element, with two subtopics below, and any sub sub topics within that.
Would the topic piece of the XML look like this?
<TOPIC>Topic 1</TOPIC
<SUBTOPIC>Topic 1 Sub Topic 1</SUBTOPIC>
<SUBSUBTOPIC>Topic 1 Sub Topic 1 Sub Sub Topic</SUBTOPIC>
...
...
and so on...
Or is there a better way to organize this within the XML document? Is XML the appropriate tool to use?
My goal is to build an HTML file using this XML content, and to use InDesign to build out a prinatable and PDF version of the content. I have everything else figured out in InDesign except how to properly sort the topic elements and sub topics. Each course can have numerous topics and sub topics.
Thanks for any help!
DC
Essentially I have a product catalog that I need to be able to sort the data by category / product / etc. My first task, and what I'd like help on, is figuring out how to put in a topic / description into the XML format.
The end result needs to look something like this:
Course Name: Course Title goes here
Length of Course: # of days in course
Overview: This is an overview of the course.
Prerequisites: These are the prerequisites.
Topics:
Topic 1
SubTopic
SubTopic
Sub Sub Topic
Topic 2
Sub Topic
Sub Sub Topic
Sub Sub Topic
etc...
Essentially, I am confused on what the proper markup should be for an ordered list. I need topic 1 to be the first element, with two subtopics below, and any sub sub topics within that.
Would the topic piece of the XML look like this?
<TOPIC>Topic 1</TOPIC
<SUBTOPIC>Topic 1 Sub Topic 1</SUBTOPIC>
<SUBSUBTOPIC>Topic 1 Sub Topic 1 Sub Sub Topic</SUBTOPIC>
...
...
and so on...
Or is there a better way to organize this within the XML document? Is XML the appropriate tool to use?
My goal is to build an HTML file using this XML content, and to use InDesign to build out a prinatable and PDF version of the content. I have everything else figured out in InDesign except how to properly sort the topic elements and sub topics. Each course can have numerous topics and sub topics.
Thanks for any help!
DC