XSLT Fragment question

I am using an XSLT fragment in order to display an RSS feed on a webpage. The problem is that there is a large space at the top of my fragment. I would like to get rid of this space. Anyone know how to do this?

Alright, I will try to post the code up here soon.
On a side note, my RSS feeds post the time in a format with +0000 at the end. How can I localize the time in the feed?

Similar Messages

  • XSLT Validation Question

    Well I'm diving into XSLT for the first time.  I've gotten the RSS feed to display just fine, but my problem is with the XHTML 1.0 strict validation and it could just be DW.
    What I have is a XSLT fragment file, saved as .xsl, with the feed.  I then used the server behaviors to add the fragment to my primary PHP document.  It seems that when DW adds this code into a PHP document it adds a script to the document and then includes the xsl file where I place it on the page.  However, the beginning of the XSL file shows:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    That is the line that the validator says won't validate because the only place it is allowed is at the beginning of the file but since DW is including the xsl fragment file in the middle of a file it won't validate.  Is the XSL fragment document still valid without that code at the top of it?

    Maybe this helps?
    http://www.objectsbydesign.com/projects/xslt/xhtml.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • XSLT Fragment - Help Needed

    Hi,
    I am trying to display data on a webpage from an RSS feed using a XSLT Fragment.
    I have managed to get it to work and display all the results, what I need to know is there any way I can limit the number of results shown on a page and add paging?
    Thanks

    Apologies, but, it seems i did not indicate the complete message structure for the document I am testing.
    Order (root)
    OrderHeader (1st parent segment)
    OrderNumber (child fields - 1st)
    Order.. (child fields - 2nd)
    Order...(child fields - 2nd)
    OrderDetail (1st parent segment)
    <fields under this segment were already mentioned from previous threads>
    OrderSummary (1st parent segment)
    NumOfLines (child fields - 1st)
    TotalAmount (child fields - 1st)
    Under Order, there are also OrderHeader and OrderSummary parent segment, other than OrderDetail, in which we focus our code.
    I've tried your code, but, the segments OrderHeader and OrderSummary and child fields under it were not appearing on my output.
    But it seems, I've already generated the correct code.
    Here it is,
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" version="1.0" media-type="xml" encoding="UTF-8" indent="yes"/>
         <xsl:template match="@*|node()">
              <xsl:copy>
                   <xsl:apply-templates select="@*|node()"/>
              </xsl:copy>
         <xsl:template match="/Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/BuyerPartNumber">
              <xsl:for-each select=".">
                   <BuyerPartNumber>
                        <PartNum>
                             <PartID>
                                  <xsl:value-of select="../ManufacturerPartNumber/PartID"/>
                             </PartID>
                        </PartNum>
                   </BuyerPartNumber>
              </xsl:for-each>
         </xsl:template>
    </xsl:stylesheet>
    I believe, the code you've suggested last time will accomodate only OrderDetail parent segment. Is this correct?
    Thanks!

  • Create XSLT Fragment

    Hi,
    I am creating an xslt fragment - File > New > XSLT
    fragment. I then select attach remote file on the internet and I
    have put the following url:-
    http://weblogs.macromedia.com/dev_center/index.rdf
    In the Bindings panel it says that it cannot locate tor parse
    the xml source.
    I would be grateful for any help.
    Many thanks,
    Polly Anna

    I have a default installation - i.e. I have not changed any
    settings
    regarding the XSLT settings (if one can even do that!
    I'm really unsure as to why the problem would arise.
    Maybe it would be worth your while contacting Adobe to see if
    someone there
    might be able to help?
    Sorry I can't be of more help!
    Cheers,
    Rob
    http://robgt.com/ [Tutorials and
    Extensions]
    Firebox stuff:
    http://robgt.com/firebox
    Skype stuff:
    http://robgt.com/skype
    Dell stuff:
    http://robgt.com/dell
    SatNav stuff:
    http://robgt.com/satnav

  • XSLT fragment: More than one?

    I am trying to build a page with tree feeds. I have made tree
    XSLT fragments, but when i put the second one one the page, i get
    the 500 error message.
    Is it possible to have more than one, and if the answer is
    yes. What am I doing wrong?
    Regards,
    Børre

    Hello John,
    What you can do it combine the result set from these two variables into one single element based on a new custom xsd which is the combination of these two elements. Aftet doing this you can achieve the req with one transformation. Below is the sample combined xsd based on the two result sets, in this case the two result sets are from two db adapters(data from 2 tables).
    <?xml version="1.0" encoding="windows-1252" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    xmlns:db1="http://xmlns.oracle.com/pcbpel/adapter/db/top/dbadapter1"
    xmlns:db2="http://xmlns.oracle.com/pcbpel/adapter/db/top/dbadapter2"
    targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xs:import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/dbadapter1
    " schemaLocation="dbadapter1_table.xsd"/>
    <xs:import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/dbadapter2"
    schemaLocation="dbadapter2_table.xsd"/>
    <xs:element name="CompositeElement">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="CompTableElement">
    <xs:complexType>
         <xs:sequence>
              <xs:element ref="db1:root_element_from_db_adapter_1"/>
    <xs:element name="FormulaDetail">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="db2:root_element_from_db_adapter_2"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
         </xs:sequence>
         </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    After you create this xsd, create an element of this type and use this as a source in your transformation.
    Hope this helps
    Ram

  • Xslt (Fragment)

    whats the alternative to xslt (Fragment)

    It depends what you want to do. The XSLT (Fragment) was part of the deprecated PHP server behaviors that have been removed from Dreamweaver. The underlying code was quite complex because it supported both PHP 4 and PHP 5, which handled XSLT in very different ways.
    XSLT remains an official W3C specification, and you can use the PHP 5 XSL extension to transform XML documents. Dreamweaver has code hints for both XSLT and the PHP 5 XSL extension, but you're on your own as far as coding is concerned. XSLT is a rather esoteric language. I can use it for simple tasks, but not for more complex ones.
    If you want to manipulate XML with PHP, you might want to check out a couple of my courses on lynda.com: Watch the Online Video Course Up and Running with PHP SimpleXML and Watch the Online Video Course Up and Running with the Standard PHP Library. They're not free, but you can get a 10-day free trial.

  • Proper XSLT Fragment creation with blog post?

    I have been trying to establish individual rss feeds from Word Press posts into divs on dynamic php pages.
    So far I have created Dreamweaver 4 XSLT Fragment pages with an address to a remote blog on the internet. When creating the XSLT Fragment I have been entering the following addressing:
    http://xxxxx.com/blog/?feed=rss2
    The page is saved with .xsl. I then create a php dynamic page and add a div into which I bring the .xsl using Dreamweaver's Server Behavior 'XSLT Transformation'. My aim is to only have the text of that particular post from Word Press and thats it.
    When I view the php page in a browser I do see the last post on the blog but for the life of me I can not figure out how to bring in other prior posts. So far I have tried the following address changes after creating new categories in Word Press such as the category 'bio':
    http://xxxxx.com/blog/?feed=rss2&cat=bio
    I get the same results, the last post and thats it.
    Any help would be greatly appreciated. I am using MYSQL and php.
    Regards,
    Tony

    Project Management is part if the Business Center Users Only area and not everyone can access this space so I would avoid publishing there.
    It would be best to contact the space editors or moderators for SAP Portfolio and Project Management (SAP RPM, cProjects) and cFolders: click the people tab in the space to see who they are.
    Otherwise, if you're not sure, you have the option to create a personal blog: Create a Personal Blog

  • XSLT, XML Question???

    I've recently found that I can use XSLT to transform XML docs into SQL using x-path... Is there any documentation out there referencing a transformation using x-query???? I've searched the web but have not seem much on this...
    Any direction would be greatly appreciated.

    XSLT doesn't use XQuery. So it's not surprising you haven't found much documentation about using XQuery in XSLT. You might want to direct questions like this one to an XSLT forum rather than a Java forum.

  • 856 xslt Mapping question ...

    I was asked in the jdev forum to post this here as well :)
    Ramesh,
    I hate to keep bugging everyone but i have another question.
    I am trying to transform data into an X-12 856 document (outbound). I have most of the looping and everything working. My only issue is how do you handle the parent child relationships in the HL01/02 ? Since xpath does not let you increment a variable how can you keep the count of the HL loops let alone tell the HL02 (parent's HL01) We are using a SOPI scenario and the items need to be subordinate to the appopriate pack level.
    I really appreciate all the time and awnsers you have given me so far :)
    Thank you in advance,
    Jaden

    Hi,
    There is a way to handle x=x+1 in XSLT....here it is..assume u want to sum all the elements of an arraylist in an XML...create a temporary variable(TransCountSumVar) and do a foreach and group them in one more variable (Transactions_Count2)
    <xsl:variable name="TransCountSumVar">
                  <xsl:for-each select="/ns1:TotalDate/ns1:price">
                                   <Transactions_Count2>
                      <xsl:value-of select="number(ns1:price)"/>
                                  </Transactions_Count2>
                  </xsl:for-each>
    </xsl:variable>now get the sum of those in Transactions_Count2 as follows
    <xsl:variable name="TComp" select="sum(exsl:node-set($TransCountSumVar)/Transactions_Count2)"/>where Tcomp is another variable with holds the final sum and be sure to the the namespace xmlns:exsl="http://exslt.org/common" in XSL at name space declarations.

  • Genereting JSTL tags with an XSLT transformation question

    Hi there!
    I have some XML datas to display in a jsp file.
    XML content is of this type:
    <message>
    <title>A message</title>
    </message>
    The most elegent way to present them is to transform XML via xslt into xhtml.
    (that way I can externally change with ease the message formatting output without changing the jsp)
    For that, I use the cool tag
    <x:transform>
    on each xml file i want to display (with x:foreEach)
    The output produced for each xml file is:
    <div class="message">
    <h2>A message</h2>
    </div>
    My problem is now that I want to include custom tags in the generated content!
    For exemple:
    <div class="message">
    <h2>A message<c:out ...></h2>
    </div>
    My question is:
    how can I make that xslt generated tag to be executed???
    Since it is the product of an xslt transformation ,I suppose it won't be executed at all...
    Advices greatly appreciated! :)

    I'm not sure I understand what you mean when you say "how can I make that xslt generated tag to be executed???"
    You've got your XML input and the XSL-T stylesheet that will transform the XML input into an XHTML stream containing JSTL tags.
    I'm assuming that you're going to ask a servlet to pass the XML input to the XSL transformer and get the XHTML output stream. Once you have that, the servlet will write the XHTML to the HTTP response output stream, where it'll be rendered by the browser.
    I think the key is to make sure that you tell the browser that response type is a JSP (that's the only document type in which it makes sense to put JSTL tags). When the browser gets that JSP, it'll treat it like any other: generate .java code, compile that to a .class file, and then render.
    I'm not sure about efficiency, but it sure is an elegant solution. - MOD

  • Fragment question today

    Good afternoon,
    im playing around with fragments and i though i was understanding the concept just fine until i decided to build a Fiscal Year (FY) fragment.
    My idea was to build a FY frag that i could attach to all my 250 forms and once a year, update the fragment file with the new year and voila, all my 250 forms now reflect that change.
    Is this how fragments really work? im on a corporate network and when i was testing this this morning it was working, but not on my users machine. I just now see that on my machine the only reason it works is because i do a PDF preview from within Livecycle Designer and that seams to be enuff to get it to sync with my fragment.
    When i test with my users, the only thing they have is the file with the fragment inside it and they open it using Reader X. But when they do, the changes to the FY frag dont show up, it just stay the same.
    Now when i test it on my machine using Reader 10 and not Livecycle Designer, i also see that the FY doesnt get updated.
    So my questions iare, am I using the fragment properly and what im I missing for this to work at all?
    thank you again for the help

    thank you very much for your reply jnicholas.
    Does anyone have a way to progrmatically calculate the Fiscal Year?
    I think i would like to come up with a FY dropdown that can know when it's time to add a new Fiscal Year. Just not sure of the code necesserry to make this happen.
    Anyone know??
    Thx again

  • XSLT Mapping Question

    Hi,
    is following possible with a xslt mapping ?
    i copy elements with <xsl:copy-of select="//Bla/*"/>
    what i want is to set a attribute at every copyied element. Always the same.
    Idea?
    Regards,
    Robin

    so it works:
         <INSERT>
         <Data>
         <xsl:for-each select="//bla/*">
         <xsl:copy use-attribute-sets="type"><xsl:value-of select="."/></xsl:copy>
         </xsl:for-each>
         </Data>
         </INSERT>
    Regards,
    Robin

  • XSLT Transformation Question

    Hi together!
    Hope anybody can help.
    I have the follow XML structure :
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">¶
    <asx:values>¶
    <IMPORT>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>222358   1NU    480350    29102007VENDA DE MERCADORIA        30</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>35403474</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>35403822</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>4480350</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>220089</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>3540347</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>4480351 </DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    </IMPORT>¶
    </asx:values>¶
    </asx:abap>
    After the XSLT Transformation i need the data in this structure :
    <data>
         <invoice>
               <id>222358</id>
               <item>35403474</item>
               <item>35403822</item>
               <code>4480350</code>
         </invoice>
         <invoice>
               <id>220089</id>
               <item>35403474</item>
               <code>4480351</code>
         </invoice>
    </data>
    I tried to group the data with the tag "xsl:for-each-group". But i get no result.
    Regards,
    Anton

    Hi,
    no one with a good hint?
    Regards,
    Anton

  • Real simple xslt problem/question

    Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name. i want to use xslt to reproduce exactly the same xml document except with an attribute called "id" added to those elements with a "result" tag name. i'm sure that theres a simple solution to it but i just cant figure it out. any helps greatly appreciated, thanks

    Start with the XSLT identity transform (I don't have it handy and it's fairly long, but you should be able to google it up). Add this:<xsl:template match="result">
      <result id="">
        <xsl:apply-templates>
      </result>
    </xsl:template>

  • A Noob XSLT SE Question

    Hi, I'm new to JavaEE.
    I was trying to install XSLT SE (downloaded from OpenESB latest nightly build, Build071030) on my multi-language GlassfishV2 final, and it just won't start.
    Here is the message:
    ERROR:(JBIFW1136)Engine sun-xslt-engine cannot be initialized. The LifeCycle init() method threw a java.lang.NoClassDefFoundError exception. The exception message is: com/sun/jbi/component/endpoint/impl/AbstractEndpoint
    Caused by:(JBIMA0000)com/sun/jbi/component/endpoint/impl/AbstractEndpointAny idea?
    The Glassfish is run on CentOS 5.
    The ESB runtime is built-in in the Glassfish.
    The XSLT engine in the Glassfish bundle in my Netbeans 6.0 beta works fine, and I have tried to install the xsltse.jar inside the bundled Glassfish into the Glassfish run on CentOS, but results the same.
    Following SL, BC and SE are installed in the Glassfish:
    sun-encoder-library
    sun-shared-util-library
    sun-transform-library
    sun-wsdl-library
    sun-file-binding
    sun-http-binding
    sun-jms-binding
    sun-bpel-engine
    sun-javaee-engine
    sun-sql-engine
    update:
    same results with english Glassfish.
    Edited by: Mark-H-Y-Lee on Oct 31, 2007 4:48 PM

    Hi Mark,
    Try removing the TransformSL library; there may be a classloading conflict between the SharedUtilSL and TransformSL. Both libraries include the AbstractEndpoint class and I suspect that's causing your issue.
    Due to JBI classloading requirements, shared libraries cannot depend on (i.e. reference) each other. Since TransformSL is built using the utilities in SharedUtilSL, such as the Common Runtime Library (CRL) and Wsdl4jExt, the SharedUtilSL currently includes TransformSL in its deployment. Consequently, there is no need to install both SharedUtilSL and TransformSL. In case it's not clear, SharedUtilSL = sun-shared-util-library and TransformSL = sun-transform-library.
    Regards,
    Kevan

Maybe you are looking for