Jump to content

Kurt Hansen

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Kurt Hansen

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. My webshop server has changed from the default ISO-8859-1 to UTF-8. My existing scripts in FM11 Pro Advanced says: <xsl:variable name="CRLF"> <xsl:text>&#x000D;&#x000A;</xsl:text> </xsl:variable> What codes should I write to change it to UTF-8?
  2. I'm sorry, Comment. I have once again managed to express myself unclear, although I myself think that I make a great effort not to do so. I see your sketch as a structure to a record collection. I ask, however, as representant of company selling music on disc media, and it is in this light my structure scetch must be seen.
  3. I have some 36,000 CDs in a flat database (FM Pro 11). I am considering building a new one, where the different data elements have their own table and bring it all together with relationships. It would be a great help to analyze a sample database, but Google has not given a useful result. The example database need not necessarily be tailored to classical music, but the principle should resemble my needs, so I can learn about the structure. Where can I find such a download? I realize that the following is rather loose and that it will show retail issues, but here are my initial thoughts: Tables: COMPOSER(s) - First name - Surname - The year of birth - The year of death - Country About birth / death: Accurate data are not always available, especially for early composers. There must be given approximate, but still so that composers can be listed in chronological order. ARTIST(s) - First name - Surname - Category example. soprano, trumpet player, pianist ITEM - Product Name / Title - Catalog Number - Barcode (with validation) - Purchase price - Wholesale price - Retail price - Release date - Genre (classical, jazz, traditional etc.) - Category (orchestral music, chamber music, opera etc.) - Media (1 CD, 2 SACD, 1 CD + 1 DVD etc.) RECORD COMPANIES - Name - Account number - Supplier
  4. Aha! Got it. Thanks. Yes I know that I should (...) but my needs are very modest and irregular; usually just a few times a year. I am not unwilling to make an effort itself, but my experience is that even a very conscientious review of a tutorial is not stored in my memory, so I can remember it next time.
  5. Please see attachment. How to select? My table has the name "Varer" and "Category" is "Kategori" in Danish. [ YourTable::Category; "instrument" ]
  6. As I (mis)understand you(?) I must select both "Category" + "Instrument" (and "Category" + "Instrument"). My database is flat with only one table. I havn't got tables called "Category" and "Categori 2".
  7. I'm sorry, I do not know. It is as I had seen the proposal. Which 2 of the 4 should I keep? [Edit] Ok, comment. I'm working and I think I'm going the reght way now.
  8. Yes, comment, I believe that, but it would be quite a work for me to "split" my data into two tables. I have 35.000 records in my current flat database AND I'm a novice ;-)
  9. Thanks, Webko, but...! I want it to output only if "Kategori" or "Kategori 2" contains the word "Instrument". My test (see attachments) doesn't do that. Example: Catalog number BRIDGE 9450 outputs "Kammermusik Klaver Klaver Klarinet Fagot". In my database "Kategori" contains "Kammermusik" and "Kategori 2" contains "Instrument".
  10. I have the following fields in a table (classical music): Category Category 2 instrument 1 instrument 2 instrument 3 instrument 4 I would like to make a script that export to the following conditions: IF "category" OR "category 2" contains "Instrument" then output the contents of "Instrument 1", "Instrument 2", "Instrument 3" and "Instrument 4". If I add two or more conditions the default is AND. How do I change this to OR?
  11. I'm sorry, Comment. I realize now that I made a mistake in "Export Records" in the script. I specified "Tab-Separeted Text" as filetype - not "XML". Everything is working fine now. Thank you for your general helpfulness
  12. Sorry, Bruce. You are right. I want TAB delimited. Thanks, Comment. Unfortunately these solutions are too complicated for me. Fenton's example (Export_Tab_wHeader_xml.zip) works fine. My problem is how to merge Fonton's .xls with my existing ditto: Fenton: <?xml version='1.0' encoding='utf-8'?> <xsl:stylesheet xmlns:fmp="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fmp" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:for-each select="fmp:FMPXMLRESULT/fmp:METADATA"> <xsl:for-each select="fmp:FIELD"> <xsl:value-of select="@NAME"/> <xsl:if test="position()!=last()"><xsl:text>&#09;</xsl:text></xsl:if> </xsl:for-each> <xsl:text>&#10;</xsl:text> </xsl:for-each> <xsl:for-each select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW"> <xsl:for-each select="fmp:COL/fmp:DATA"> <xsl:value-of select="."/> <xsl:if test="position()!=last()"><xsl:text>&#09;</xsl:text></xsl:if> </xsl:for-each> <xsl:if test="position()!=last()"><xsl:text>&#10;</xsl:text></xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> Kurt: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fmp="http://www.filemaker.com/fmpxmlresult"> <xsl:output method="text" encoding="ISO-8859-1"/> <xsl:variable name="CRLF"> <xsl:text>&#x000D;&#x000A;</xsl:text> </xsl:variable> <xsl:variable name="delimiter"> <xsl:text> </xsl:text> </xsl:variable> <xsl:template match="/"> <xsl:text>v_products_model v_products_name_1 v_products_description_1 v_products_page_title_1 v_products_meta_keywords_1 v_products_meta_description_1 v_products_short_description_1 v_products_image v_products_price_per v_products_ean v_products_price v_products_quantity v_products_weight v_categories_name_1_1 v_categories_name_2_1 v_categories_name_3_1 v_manufacturers_name v_tax_class_title v_status EOREOR&#x000D;&#x000A;</xsl:text> <xsl:for-each select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW"> <xsl:for-each select="fmp:COL"> <xsl:value-of select="fmp:DATA"/> <xsl:choose> <xsl:when test="position()=last()"> <xsl:value-of select="$CRLF"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$delimiter"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:template> </xsl:stylesheet>
  13. If I make an export to at TAB-delimited CSV-file there is no header (first line with field names). Why and how do I add this automaticly?
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.