Jump to content

vipasane

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About vipasane

  • Rank
    Newbie
  1. found some examples from antennahousehttp://www.antennahouse.com/XSLsample/XSLsample.htmunder: Stylesheet for XHTML to XSL-FO transformationAnd then for client side transormation:http://www.w3schools.com/xsl/xsl_client.asp The one remaining problem is how can I get transformed xhtml in client side?
  2. I don't know if it helps for this solution but I have Altova XmlSpy pro and Visual Studio 2010 in use.
  3. I'm a total newbie what comes to xsl:fo, so please advise me how get following requirement done.I've created a very complicated (in my opinion and compared to my knowledge and skills) xslt to generate xhtml from xml, now this needs to be transformed on demand (from that xhtml page since paging with alternating footers and headers seems to be impossible with other methods) as PDF.What is the best way to accomplish this?I thought that it could be done with javascript empedded to this xhtml page, Is there a xsl:fo styleseets available that would transform xhtml to PDF or perhaps some converter that would generate some xsl:fo templates based on existing xslt or xhtml?
  4. Check this out and read comments toohttp://www.bernzilla.com/item.php?id=333
  5. Sure I could do it statically (eg. every time these things needs some validation) with a by editing current XSLT file using Find & Replace, but I when I'm not around there should some automation so that not-technical person could do it too.
  6. Ok I'll try my best, this is simplified version of xslt I have: <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes" doctype-public="-//W3C/DTD XHTML 1.0Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" standalone="yes" media-type="text/html"/> <xsl:variable name="phrases" select="document('invoice_phrases.xml')/phrases"/> <xsl:template match="Invoices"><xsl:variable name="languageCode" select="Header/LangCode"/> <html> <head> <title/> <link rel="stylesheet" type="text/css" href="invoice_styles.css" title="Style"/> </head> <body> <h1><xsl:value-of select="$phrases/Value[@name='HEADER_title']/child::*[name() = $languageCode]"/> </h1> </body> </html> </xsl:template> And this is from invoice_phrases.xml: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><phrases xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Value name="HEADER_title"> <DE>Invoice in germany</DE> <EN>Invoice</EN> </Value></phrases> In order to find out which phrases are used and where in the initial xslt, I would like to make another xslt which will automatically "document" it by using the same layout but replaces "<xsl:value-of select="$phrases/Value[@name=" with string "Phrase variable:"and rest of it &quot]/child::*[name() = $languageCode]"/>" with empty string. At the end I would have the same html layout, but phrases are replaced with variable names instead of valid translations like in example: the html output is replaced as follows depending on a language code value of "HEADER_title" in phrases.xml is replaced with PHRASE: HEADER_titleI know it's a mess when I try to explain something, it only gets from bad to worse
  7. So yep silly me, thanks for your help and for clearing this up for me.It turned out that I already implemented this.This is what you get when you don't fully understand technology or method you're utilizing
  8. Hi,I have an XSLT which uses common phrases to implement multilingual support. I would like to have a another xslt which could easily show up which phrases are used and where they are usedExample of usage: <!-- usage in xslt --><xsl:value-of select="$phrases/Value[@name='HEADER_title']/child::*[name() = $languageCode]"/><!-- replacements -->"<xsl:value-of select="$phrases/Value[@name='" should be replace as "Phrase:""']/child::*[name() = $languageCode]"/>" and respectively should replace as empty string How can I implement this with xsl version 1.0?I'm thankful for any help or thoughts you might bring in to this topic
  9. If my source xml file has encoding="ISO-8859-1" is there a way to convert it forexample to UTF-8 though XSLT ?If so how could that be done?Thank you for reading so far, any help would be appreciated
×
×
  • Create New...