G
grghoward
I am receiving a series of Microsoft Word documents from web clients
that they upload to my server. I need to convert them to XML to pass
through to another system. I have done this through Microsoft Word
2003 with the "Save as XML" option. Now the tricky part is that a
portion of these documents contains a numbered outline. Unfortunately,
I need to remove the numbering before passing the data to the next
system. Here is an example of what I am talking about:
1.{Tab}Check on the status of feedback from the newsgroup.
2.{Tab}If response received, read the response
3.{Tab}If the response applies, use it
(Replace the {Tab} with a tab key...). Unfortunately, there is no
guarantee that it will be a tab key. Some users have been uploading a
true outline formatted document. As such, I need to build in a "slop
factor" if possible.
After the document is saved as XML using the Microsoft Word 2003 "Save
as XML" option, the text string for the numbers looks like:
1.Check on the status...
See the lack of space between the numeral and the text? Now, I could
use the XSLT substring() function except that the number of items
sometimes is less than 10 (single digit), but has been seen to reach
over 100 (triple digit). Does anyone know of a creative way to strip
away the leading integer plus the period from the text string? Or,
does anyone know of a way to determine the location of the decimal if
the characters before it are integers?
Any help would be greatly appreciated.
Greg Howard
that they upload to my server. I need to convert them to XML to pass
through to another system. I have done this through Microsoft Word
2003 with the "Save as XML" option. Now the tricky part is that a
portion of these documents contains a numbered outline. Unfortunately,
I need to remove the numbering before passing the data to the next
system. Here is an example of what I am talking about:
1.{Tab}Check on the status of feedback from the newsgroup.
2.{Tab}If response received, read the response
3.{Tab}If the response applies, use it
(Replace the {Tab} with a tab key...). Unfortunately, there is no
guarantee that it will be a tab key. Some users have been uploading a
true outline formatted document. As such, I need to build in a "slop
factor" if possible.
After the document is saved as XML using the Microsoft Word 2003 "Save
as XML" option, the text string for the numbers looks like:
1.Check on the status...
See the lack of space between the numeral and the text? Now, I could
use the XSLT substring() function except that the number of items
sometimes is less than 10 (single digit), but has been seen to reach
over 100 (triple digit). Does anyone know of a creative way to strip
away the leading integer plus the period from the text string? Or,
does anyone know of a way to determine the location of the decimal if
the characters before it are integers?
Any help would be greatly appreciated.
Greg Howard