hi Adam,
I see what your script is doing. but you have to assign it that list.
what I am trying to do is go through that file I have merged and sort the dictionary entries which are in bold.
[i]
not sure how I am gonna do that though.
bill
hi Adam,
I see what your script is doing. but you have to assign it that list.
what I am trying to do is go through that file I have merged and sort the dictionary entries which are in bold.
[i]
not sure how I am gonna do that though.
bill
Hi Bill,
I wasn’t expecting this outcome when first answering your post. I thought you just wanted to merge xml files for a record or something, instead of creating a larger working xml file. As I worte before, I don’t know much about xml, but have experimented very little with xml tools. I’ve read that tiger has a built in xml reading stuff. Maybe you can use that to alphabetize and merge your files. Wish I had a few xml files to experiment with. Where did you get it? Articles from the Encyclopedia Britannica site?
Edited: ps. I don’t know if this can be done, but was just wondering.
gl,
hi kel and all,
again, I really appreciate your help with scripts, I would never do something like that on my own. learning takes time, and this project did not give me a lot of time to learn all the tools. As far as the alph. ordering, when you work on a project, you are not sure (sometimes) you are not sure about the complexities/bugs you gonna run into till you run into such complexities. alph. ordering was one of them, and I admit if I planned the project and the system design really good, I should kept in mind all the (what if…do that…). you live and learn.
I am not experimenting with the EB stuff, it’s project been assigned to me. I am not allowed to share content with anyone outside the project group (which all lack any knowledge about XML or Applescript).
I would be using this forum more often for apple script issues.
again, I don’t think my question was XML specific…depends how you approach the problem.
if we approach the issue in a different way, it would not be an XML issue: what if we combine all the separate XML in subfolders in one folder with all these XML files, then do the suggested script from (kel) to merge them into one XML file. I am thinking, it would be easier to organize these XML files alpheb. then merge them than trying to merge and then order.
bill
Whoa, b_bobb; this is a major shift in direction. In this thread up to #17, Kel had helped you get files out of a bunch of folders into a single document in its own folder (as I understand it). Kel and I had each posted methods for getting rid of the header part by targeting the article within. So you should have a huge file of articles organized however they were in the source.
Then in #18, you tell us there’s a bug which isn’t a bug at all - the files are not alphabetic in the long file. Of course that’s because at no point in the previous 17 posts had alphabetization ever been mentioned. So the time has come to get down to a design for this project. You’ve got snippets of code that will do the pieces of what you want to do, but the uncertainty arises because it’s not clear that you know what you want to do.
Please write out a grand plan for us or we’re just stabbing in the dark.
hi all,
well…sorry, didn’t mean to turn things that way. honestly I wasn’t sure what the the ouput files should look like.
kel’s script helped me a lot…you don’t understand…w/o kel’s help, I would have been pulling my hair…kel…thank you sooooo much.
any way, I figured a way to do the alph. ordering in XSLT
<xsl:template match=“articles”>
<xsl:for-each select=“article”>
<xsl:sort select=“title”/>
<xsl:copy-of select=“.”/>
</xsl:for-each>
</xsl:template>
bill
I didn’t mean to discourage you from asking more questions, Bill; it’s just that we don’t know where these bits come from and whether they could have been alphabetized along the way to were they end up. Be sure to post your answer too - folks who have been following this thread will wonder how you did.
Glad XSLT will do the doings. Assume you’ve looked at these links:
http://www-128.ibm.com/developerworks/library/x-xslt/
http://www.w3schools.com/xsl/
Adam
well, I am still running into some bugs (XSLT) stuff.
basically what I did is made sure no entities were expanded during tranformation, and done that by replacing the ampresand before entities with any word, and revrse that after transormation. again, project reguirement decide to do such a thing or allow expansion of entities.
as far as ordering the words alphabetically, that’s what I have used
<xsl:template match=“articles”>
<xsl:for-each select=“article”>
<xsl:sort select=“title”/>
<xsl:copy-of select=“.”/>
</xsl:for-each>
</xsl:template>
the same as mentioned in earleir thread.
Adam, as far as being discouraged from posting in this forum, that’s not the case. It was my fault in not supplying enogh info about the project.
thanks
Bill