Copying attribute values in xsl transformation

Hi
Does anyone know how to copy attribute values in a transfomation generated in a routing rule of a ESB routing service.
When I inspect the generated xsl (after mapping elements), I can see that the xsl:value-of is used and therefore the element attributes of the original message are lost.
Specifically when an element contains the xsi:nil attribute, I want to copy it to the target message.
Suggestions would be greatly appreciated,
Ruud

Hi Nathalie,
Thanks for your reply.
I would like to elaborate a bit on our problem because I feel that we haven't reached a satisfactory solution yet.
We are using ESB database adapters to perform DML operations on the database. However we expose these adapters using routing services to allow us to use filters, content based routing etc.
Consider this example:
I want to perform an update on a row in the database. If my soap call contains an empty element, this element will be ignored. If I want this the corresponding attribute in the database set to NULL then I have to add the xsi:nill="true" attribute to the element in my message. This works great when invoking the database adapter directly but when you place a routing service in front of it, the transformation will wipe out the xsi:nill="true" attribute on the element causing the database adapter to ignore the element instead of updating to NULL.
We have found two workarounds:
detectommissions="false" setting in the wsdl of the database adapter. All empty elements in the message will cause an update to NULL in the database. This means that for every update you always have to have all values in your message to prevent unwanted updates to NULL.
Add a choose / when / otherwise construction in the transformation of the routing service. If the source element is empty we add an empty element in the destination message containing an xsi:nill="true" attribute, otherwise we just copy the value.
This construction should be added for each attribute that must be updateable to null.
Both of these solutions are not satisfactory because they eliminate the choice whether an empty element in the invoking soap call should be ignored or used to trigger an update to null.
We would like to be able to detect the xsi:nill="attribute" on the invoking call and propagate this attribute to the call to the database adapter.
Kind regards,
Ruud

Similar Messages

  • Copying attribute values in OIM

    Hi Experts,
       Please suggest me the solution for below requirement.
    1. I am having the original attributes "Cost center name " and Cost center Number".But i have to copy these values and stored into attributes "old cost center name" and "Old cost center number"
    once its done,giving new values in cost center name and cost center number has to store the new values.
    Thanks in advance.
    Reddy.

    HI Redyy,
    You can write java code which will copy the original values to the new variable and after that you can assign new value to the original variable.
    Thanks,
    ST

  • XSL Transformation - cut asx:abap and asx:values

    Hey all,
    I'm using a XSL Transformation to create a XML-File from an internal table.
    My problem is, that the transformation automatically puts the two tags "<asx:abap xmlns:asx="http://www.sap.com/abapxml">" and "<asx:values>" at the beginning of my file (or string):
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml">
    <asx:values>
    <ROOT>
    </ROOT>
    </asx:values>
    </asx:abap>
    Does anyone have any idea how I can easily suppress these lines?
    The best course would be of course an XSL statement.
    Thanks and regards,
    Martin.

    Will using a Simple Transformation help your case ?

  • Xsl:sort order attribute value template

    I am trying the use the following in XDB 10.1.0.2
    <xsl:sort order="{$myOrder} ...
    It appears that the order attribute does not allow an attribute value template.
    Any suggestions would be appreciated.
    Anthony

    This is known bug 1798018 in the Oracle XSLT processor.
    The only workaround I can think of is to use <xsl:choose> to optionally use different <xsl:for-each> blocks, one with order="ascending" and one with order="descending" as literal values.

  • Error: "... is not a table ..." XML not correctly interpreted after XSL-transformation. Table row quantity problem.

    Hey guys, this is one of my xml-elements:
    Jaspreet Sohi 12 18 Juliane Lenz 11 17 Sophie Charlotte Stender 10 15 Rosbeh Hamidzadeh Khayyat 12 17 Lion Stoldt 12 17 Mats Lucas Meincke 6 8 Bero Luke Vincent Ernst 6 8 Cedric Roth 6 8 Soner Cantay 6 8 The following XSL Transformation I use once for transforming all "m" tags and once in order to transform all "j" tags. Please imagine the CSL-code below to be duplicated exactly. Only the "jungs"-table-Tag is replaced by "mädchen" and all underscores _j are replace by _m. As well all "select="j[@..." parts are replaced by "select="m[@...". 1 2 3 The code is very easygoing I think and not difficult to understand. As I said, I use it twice - for both transformations. The very, extremely weird thing, my problem, is that one transformation works perfectly in InDesign and a table is created for all "kategorie"-tags (all is set within a for-each loop). But the second script does not work! I simply do not get this I can't understand it. I've tried more than anything. InDesign sais (in German, so translated based on assumption) "jungs is an invalid table element or is displayed in wrong order". The second strange thing is that I can replace my "aid:trows" attribute by any number, e.g. "10" and immediately the script works fine (as there are never more than 6 "j" tags in my XML so that never the table has more than 6 rows"). But it does not want to work correctly with the actual number, my variable "rows_j". These are my variables: They are all defined before the tables for m and j are created. So finally, why (the heck) is one table created and interpreted perfectly whereas the second - immediately following the first in the XSL.script as an EXACT copy of the first - results in an error? As i've already said, I've tried really everything. For example the script works also when one of the parts "" is randomly deleted from the script. Removing one of these parts directly makes the script working. Just one of my attempts to understand the thing but this has only shown that none of these parts "cell to end-for-each" includes an error. I'm really desperate and looking forward to being rescued by one of you geniuses :)

    Hah, No worries. The forum software is, well, different.
    What would be better, though, would be a sample ID file, any XSLT/XLT files you use, and a bit of data exactly as you have it (pre-transform state). ZIP it up, upload to say dropbox.com and feel free to send me a private message for the download link.
    Too many times there is something different between samples pasted into a post and the real thing that it is sometimes less useful time-wise. I'll keep it private, of course. Then we can communicate via PMs or email until we can (hopefully) arrive together at a solution, then post what that solution is in the forum to benefit others.
    Thank you, Mike

  • XSLT Mapping - replacing attribute value of a specific node

    Hi,
    I want to replace the value of an attribute for a specific node. Can you please tell me how this can be achieved using XSLT coding?
    The input file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">
         <EnvelopeVersion>2.0</EnvelopeVersion>
         <Header>
              <MessageDetails>
                   <Class>IR-PAYE-MOV</Class>
                   <Qualifier>request</Qualifier>
                   <Function>submit</Function>
                   <CorrelationID/>
                   <Transformation>XML</Transformation>
                   <GatewayTimestamp/>
              </MessageDetails>
              <SenderDetails>
                   <IDAuthentication>
                        <SenderID>isv142</SenderID>
                        <Authentication>
                             <Method>MD5</Method>
                             <Value>1L2xFE8WqHHI5iVMGhixAg==</Value>
                        </Authentication>
                   </IDAuthentication>
              </SenderDetails>
         </Header>
         <GovTalkDetails>
              <Keys>
                   <Key Type="TaxOfficeNumber">123</Key>
                   <Key Type="TaxOfficeReference">MD345</Key>
              </Keys>
              <ChannelRouting>
                   <Channel>
                        <URI>0142</URI>
                   </Channel>
              </ChannelRouting>
         </GovTalkDetails>
         <Body>
              <IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/PAYE/MOV/09-10/1">
                   <IRheader>
                        <Keys>
                             <Key Type="TaxOfficeNumber">123</Key>
                             <Key Type="TaxOfficeReference">MD345</Key>
                        </Keys>
                        <PeriodEnd>2009-09-29</PeriodEnd>
                        <DefaultCurrency>GBP</DefaultCurrency>
                        <IRmark Type="generic">03Bfkipk6UDWSXLj77ObBVoK894=</IRmark>
                        <Sender>Company</Sender>
                   </IRheader>
                   <InYearMovements>
                        <EmployerName>form p60</EmployerName>
                        <P46 Statement="A">
                             <Name>
                                  <Fore>Smith</Fore>
                                  <Sur>John</Sur>
                             </Name>
                             <Address>
                                  <Line>Sterling Residency</Line>
                                  <Line>Gehde</Line>
                                  <Line>Hedge End</Line>
                                  <Line>Southampton</Line>
                                  <PostCode>12345678</PostCode>
                             </Address>
                             <WorksNumber>20090030</WorksNumber>
                             <NINO>NP258719D</NINO>
                             <BirthDate>1985-07-11</BirthDate>
                             <Gender>male</Gender>
                             <StartDate>2009-04-20</StartDate>
                             <TaxCodeInUse>647L</TaxCodeInUse>
                        </P46>
                   </InYearMovements>
              </IRenvelope>
         </Body>
    </GovTalkMessage>
    I want to replace the value 'http://www.govtalk.gov.uk/taxation/PAYE/MOV/09-10/1' of attribute xmlns belonging to the node 'IRenvelope' with the value 'http://www.govtalk.gov.uk/taxation/PAYE/MOV/10-11/1'
    So the output of the mapping should be:
    <?xml version="1.0" encoding="UTF-8"?>
    <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">
         <EnvelopeVersion>2.0</EnvelopeVersion>
         <Header>
              <MessageDetails>
                   <Class>IR-PAYE-MOV</Class>
                   <Qualifier>request</Qualifier>
                   <Function>submit</Function>
                   <CorrelationID/>
                   <Transformation>XML</Transformation>
                   <GatewayTimestamp/>
              </MessageDetails>
              <SenderDetails>
                   <IDAuthentication>
                        <SenderID>isv142</SenderID>
                        <Authentication>
                             <Method>MD5</Method>
                             <Value>1L2xFE8WqHHI5iVMGhixAg==</Value>
                        </Authentication>
                   </IDAuthentication>
              </SenderDetails>
         </Header>
         <GovTalkDetails>
              <Keys>
                   <Key Type="TaxOfficeNumber">123</Key>
                   <Key Type="TaxOfficeReference">MD345</Key>
              </Keys>
              <ChannelRouting>
                   <Channel>
                        <URI>0142</URI>
                   </Channel>
              </ChannelRouting>
         </GovTalkDetails>
         <Body>
              <IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/PAYE/MOV/10-11/1">
                   <IRheader>
                        <Keys>
                             <Key Type="TaxOfficeNumber">123</Key>
                             <Key Type="TaxOfficeReference">MD345</Key>
                        </Keys>
                        <PeriodEnd>2009-09-29</PeriodEnd>
                        <DefaultCurrency>GBP</DefaultCurrency>
                        <IRmark Type="generic">03Bfkipk6UDWSXLj77ObBVoK894=</IRmark>
                        <Sender>Company</Sender>
                   </IRheader>
                   <InYearMovements>
                        <EmployerName>form p60</EmployerName>
                        <P46 Statement="A">
                             <Name>
                                  <Fore>Smith</Fore>
                                  <Sur>John</Sur>
                             </Name>
                             <Address>
                                  <Line>Sterling Residency</Line>
                                  <Line>Gehde</Line>
                                  <Line>Hedge End</Line>
                                  <Line>Southampton</Line>
                                  <PostCode>12345678</PostCode>
                             </Address>
                             <WorksNumber>20090030</WorksNumber>
                             <NINO>NP258719D</NINO>
                             <BirthDate>1985-07-11</BirthDate>
                             <Gender>male</Gender>
                             <StartDate>2009-04-20</StartDate>
                             <TaxCodeInUse>647L</TaxCodeInUse>
                        </P46>
                   </InYearMovements>
              </IRenvelope>
         </Body>
    </GovTalkMessage>
    Thanks & Regards,
    Aditi Naik

    Hi,
    You get name of an attribute by this code
    <xsl:for-each select="@*">
        <xsl:text>Value of </xsl:text>
               <xsl:value-of select="name(.)"/>
        <xsl:text> is </xsl:text><xsl:value-of select="."/>
    </xsl:for-each>
    Change value by providing new value in <xsl:value-of select="."/>
    Regards
    suraj

  • XSL transformation not working

    Hi!
    I am having problems when trying to generate XSL transformation from XML to XML (where XML output is actually XHTML). It always fails executing <xsl:callTemplate name="something", when <xsl:callTemplate /> is executed from another <xsl:template> which is also called with <xsl:callTemplate. Version of database is 10.2.0.4.0, received error is: ORA-00604: invalid character value 'burek' for attribute 'name'.
    Transformation is working in Java and Altova XMLSpy.
    PL/SQL code:
    procedure process_xsl(p_xml in clob, p_xsl in clob, p_result out clob) is
    w_xsl_proc dbms_XSLProcessor.Processor;
    w_xsl_ss dbms_XSLProcessor.Stylesheet;
    w_dom_xsl dbms_xmldom.DOMDocument;
    w_dom_xml dbms_xmldom.DOMDocument;
    w_parser dbms_xmlparser.Parser;
    begin
    --xml in xsl iz cloba v DOMDocument
    w_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(w_parser, p_xml);
    w_dom_xml := dbms_xmlparser.getDocument(w_parser);
    dbms_xmlparser.freeParser(w_parser);
    w_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(w_parser, p_xsl);
    w_dom_xsl := dbms_xmlparser.getDocument(w_parser);
    dbms_xmlparser.freeParser(w_parser);
    --xsl procesiranje
    w_xsl_proc := dbms_XSLProcessor.newProcessor;
    w_xsl_ss := dbms_XSLProcessor.newStylesheet(w_dom_xsl, null); <-- Here error is received
    END;
    Stylesheet:
    <?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" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></xsl:output>
         <xsl:decimal-format name="dec" decimal-separator="," grouping-separator="."/>
         <!-- Predefined constants from einvoice xml schema -->
         <xsl:variable name="einvoiceIssuerCode" select="'II'"></xsl:variable>
         <xsl:variable name="einvoiceRecipientCode" select="'IV'"></xsl:variable>
         <xsl:variable name="einvoiceIssueLocationCode" select="91"></xsl:variable>
         <xsl:variable name="einvoiceIssueDateCode" select="137"></xsl:variable>
         <!-- Constants directly from document which is a part of transformation -->
         <xsl:variable name="einvoiceNumber" select="/IzdaniRacunEnostavni/Racun/GlavaRacuna/StevilkaRacuna/text()"></xsl:variable>
         <!-- Intro template -->
         *<xsl:template name="burek"> <!-- Second template called with xsl:call template -->*
              <xsl:text>TEST</xsl:text>
         </xsl:template>
         <!-- Template in which we create html structure including css -->
         <xsl:template name="einvoice">
              <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
                   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                   <title>Vizualizacija e-računa št. </title>
                   <xsl:call-template name="burek"></xsl:call-template>
              </head>
              <body>
              </body>
              </html>
         </xsl:template>
         <!-- Intro template -->
         <xsl:template match="/">
    *          <xsl:call-template name="einvoice"></xsl:call-template> <!-- This call is OK -->*
         </xsl:template>
    </xsl:stylesheet>
    XML document
    <?xml version="1.0" encoding="UTF-8"?>
    <IzdaniRacunEnostavni>
    <Racun Id="data">
    <GlavaRacuna>
    <VrstaRacuna>380</VrstaRacuna>
    <StevilkaRacuna>1205019908211</StevilkaRacuna>
    <FunkcijaRacuna>9</FunkcijaRacuna>
    </GlavaRacuna>
    <DatumiRacuna>
    <VrstaDatuma>137</VrstaDatuma>
    <DatumRacuna>2012-05-07T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-28T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-05-27T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-03-28T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-26T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-27T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <Lokacije>
    <VrstaLokacije>91</VrstaLokacije>
    <NazivLokacije>Ljubljana</NazivLokacije>
    </Lokacije>
    </Racun>
    </IzdaniRacunEnostavni>
    Edited by: 938026 on 01-Jun-2012 00:35

    Hi,
    I think your problem lies in the <title>. You are using non UTF-8 characters in the title (š), but you marked your XML as UTF-8. So change the title to have unicode charaters and it will work.
    Herald ten Dam
    http://htendam.wordpress.com

  • Xml/html to jsp - problem with quotes in attribute values

    I am trying to convert a static html document into a jsp using an xsl stylesheet, but run into problems trying to use the jsp expression syntax inside of attribute values.
    Here is a sample of the source file:
    <input type="text" name="firstName" value=""/>
    Here is what I want the resulting jsp file to look like:
    <input type="text" name="firstName" value="<jsp:expression>customer.getField("firstName") </jsp:expression>">
    Here is what part of my stylesheet looks like:
    <xsl:template match="input">
    <xsl:copy>
    <xsl:copy-of select="@type"/>
    <xsl:copy-of select="@name"/>
    <xsl:attribute name="value">
    <xsl:text disable-output-escaping="yes"><jsp:expression></xsl:text>
    <xsl:text disable-output-escaping="yes">customer.getField(</xsl:text>
    <xsl:text disable-output-escaping="yes">"</xsl:text>
    <xsl:value-of select="@name"/> ")
    <xsl:text disable-output-escaping="yes">")</xsl:text>
    <xsl:text disable-output-escaping="yes"></jsp:expression></xsl:text>
    </xsl:attribute>
    </xsl:copy>
    </xsl:template>
    The problem i have is with the <%= customer.getField("firstName") %>. I have tried several different ways of inserting the double quotes around firstName, but no matter what I try, it always uses the entity reference instead of actually putting the " character. The jsp container will not accept the entity.
    I am assuming that the problem is with trying to place double quotes inside of an attribute value. Any ideas how to get around this?
    Thanks
    David

    Which App Server are you using?
    You should just be able to escape the double quotes.
    If that doesn't work, it's a bug in the app-server.
    Alternatively, you can use single quotes around the
    attribute value.
    Hope that helps,
    AlexSorry, I'm an idiot. By escaping you meant the unicode character escape "\u0022". I had not tried that. However, once i realized what you meant, I tried it, and it worked. Thanks for your help.
    David

  • Row to Column XSL Transform in BLS

    I have 11.5, sr3.
    I was going to use the XSLTransformation action to swap rows and columns of a data set using /Illuminator/stylesheets/RowToColumnTransform.xsl. I cannot get anything but the following as an output:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-12-12T13:27:29" EndDate="2007-12-03T08:09:17" StartDate="2007-12-03T08:09:17" Version="11.5.3"><Rowset><Columns/><Row/></Rowset></Rowsets>
    There are no errors, I just don't get the result. The input data set is as follows:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-12-12T13:27:29" EndDate="2007-12-03T08:09:17" StartDate="2007-12-03T08:09:17" Version="11.5.3"><Rowset><Columns><Column Description="" MaxRange="1" MinRange="0" Name="User_ID" SQLDataType="1" SourceColumn="User_ID"/><Column Description="" MaxRange="1" MinRange="0" Name="User_Name" SQLDataType="1" SourceColumn="User_Name"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Number" SQLDataType="4" SourceColumn="Sample_Number"/><Column Description="User Name" MaxRange="1" MinRange="0" Name="Login_By" SQLDataType="1" SourceColumn="Login_By"/><Column Description="Examination Type" MaxRange="1" MinRange="0" Name="Examination" SQLDataType="1" SourceColumn="Examination"/><Column Description="" MaxRange="1" MinRange="0" Name="Examination_Title" SQLDataType="1" SourceColumn="Examination_Title"/><Column Description="" MaxRange="1" MinRange="0" Name="Examination_Desc" SQLDataType="1" SourceColumn="Examination_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Test_Number" SQLDataType="4" SourceColumn="Test_Number"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Time" SQLDataType="93" SourceColumn="Sample_Time"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Status" SQLDataType="1" SourceColumn="Sample_Status"/><Column Description="" MaxRange="1" MinRange="0" Name="Authorize" SQLDataType="1" SourceColumn="Authorize"/><Column Description="" MaxRange="1" MinRange="0" Name="Total_Defects" SQLDataType="4" SourceColumn="Total_Defects"/><Column Description="" MaxRange="1" MinRange="0" Name="Carton_Code_Date" SQLDataType="1" SourceColumn="Carton_Code_Date"/><Column Description="" MaxRange="1" MinRange="0" Name="Package_Code_Date" SQLDataType="1" SourceColumn="Package_Code_Date"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_1_Container" SQLDataType="1" SourceColumn="Sample_1_Container"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_2_Container" SQLDataType="1" SourceColumn="Sample_2_Container"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_1_Container_Get" SQLDataType="1" SourceColumn="Sample_1_Container_Get"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_2_Container_Get" SQLDataType="1" SourceColumn="Sample_2_Container_Get"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_Scanned" SQLDataType="1" SourceColumn="Machine_Scanned"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_Shift_Flag" SQLDataType="4" SourceColumn="Machine_Shift_Flag"/><Column Description="" MaxRange="1" MinRange="0" Name="Maker_Name" SQLDataType="1" SourceColumn="Maker_Name"/><Column Description="" MaxRange="1" MinRange="0" Name="Packer_Name" SQLDataType="1" SourceColumn="Packer_Name"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Size" SQLDataType="4" SourceColumn="Sample_Size"/><Column Description="SAP Product Code of the associated Cigarette Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Cig_Audit_SAP_Code" SQLDataType="1" SourceColumn="Associated_Cig_Audit_SAP_Code"/><Column Description="SAP Product Code of the associated Pack Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Pack_Audit_SAP_Code" SQLDataType="1" SourceColumn="Associated_Pack_Audit_SAP_Code"/><Column Description="Sample Number of the associated CIg Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Cig_Audit_Sample_Number" SQLDataType="1" SourceColumn="Associated_Cig_Audit_Sample_Number"/><Column Description="Sample Number of the associated Pack Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Pack_Audit_Sample_Number" SQLDataType="1" SourceColumn="Associated_Pack_Audit_Sample_Number"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_SAP_Code" SQLDataType="1" SourceColumn="Machine_SAP_Code"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_SAP_Desc" SQLDataType="1" SourceColumn="Machine_SAP_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Maker_SAP_Code" SQLDataType="1" SourceColumn="Maker_SAP_Code"/><Column Description="" MaxRange="1" MinRange="0" Name="Maker_SAP_Desc" SQLDataType="1" SourceColumn="Maker_SAP_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Packer_SAP_Code" SQLDataType="1" SourceColumn="Packer_SAP_Code"/><Column Description="" MaxRange="1" MinRange="0" Name="Packer_SAP_Desc" SQLDataType="1" SourceColumn="Packer_SAP_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Action" SQLDataType="1" SourceColumn="Action"/></Columns><Row><Sample_Number>46</Sample_Number><Examination>MKNG_PQC_PACK</Examination><Examination_Title>PQC Pack Audit</Examination_Title><Examination_Desc>Making &amp; Packing PQC Pack Audit Sample Template</Examination_Desc><User_ID>clmf90</User_ID><User_Name></User_Name><Login_By>SYSTEM</Login_By><Test_Number>63</Test_Number><Sample_Time>2007-12-12T13:46:52</Sample_Time><Sample_Status>Complete</Sample_Status><Authorize>No</Authorize><Total_Defects>1</Total_Defects><Carton_Code_Date>-</Carton_Code_Date><Package_Code_Date>7T28D205 11:30</Package_Code_Date><Sample_1_Container>01-01</Sample_1_Container><Sample_2_Container>-</Sample_2_Container><Sample_1_Container_Get>01-01</Sample_1_Container_Get><Sample_2_Container_Get>-</Sample_2_Container_Get><Machine_Scanned>U-MAKER-205</Machine_Scanned><Maker_Name>0205</Maker_Name><Machine_Shift_Flag>1</Machine_Shift_Flag><Packer_Name>0205</Packer_Name><Sample_Size>2</Sample_Size><Associated_Cig_Audit_SAP_Code>2001155</Associated_Cig_Audit_SAP_Code><Associated_Pack_Audit_SAP_Code>-</Associated_Pack_Audit_SAP_Code><Associated_Cig_Audit_Sample_Number>MKNG-PQC-CIG-20071128-0004</Associated_Cig_Audit_Sample_Number><Associated_Pack_Audit_Sample_Number>---</Associated_Pack_Audit_Sample_Number><Machine_SAP_Code></Machine_SAP_Code><Machine_SAP_Desc>MAVERICK LT MENT 100</Machine_SAP_Desc><Maker_SAP_Code>2001155</Maker_SAP_Code><Maker_SAP_Desc>MAVERICK LT MENT 100</Maker_SAP_Desc><Packer_SAP_Desc>MAVERICK LT MENT 100</Packer_SAP_Desc><Packer_SAP_Code></Packer_SAP_Code></Row></Rowset></Rowsets>
    What am I missing?

    Sparks,
    Any reason you are not using the VerticalGrid Applet?
    Did you specify any of the parameters required by the XSL, such as ColumnID and ValueID?
    The XSL appears to only translate a single row node to a column....
    Try using this XSL:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan java">
         <xsl:output encoding="UTF-8" method="xml" media-type="text/xml"/>
         <xsl:template match="/">
              <Rowsets DateCreated="{Rowsets/@DateCreated}" Version="{Rowsets/@Version}" StartDate="{Rowsets/@StartDate}" EndDate="{Rowsets/@EndDate}">
                   <xsl:for-each select="Rowsets">
                        <xsl:copy-of select="FatalError"/>
                        <xsl:copy-of select="Messages"/>
                        <xsl:copy-of select="HyperLinks"/>
                        <xsl:if test="count(/Rowsets/FatalError) = '0'">
                             <Rowset>
                                  <Columns>
                                       <Column Name="Name" SourceColumn="Name" Description="Name" SQLDataType="1" MinRange="0.0" MaxRange="1.0"/>
                                       <Column Name="Value" SourceColumn="Value" Description="Value" SQLDataType="1" MinRange="0.0" MaxRange="1.0"/>
                                  </Columns>
                                  <xsl:for-each select="/Rowsets/Rowset/Row/*[name()]">
                                       <Row>
                                            <xsl:element name="Name">
                                                 <xsl:value-of select="name(.)"/>
                                            </xsl:element>
                                            <xsl:element name="Value">
                                                 <xsl:value-of select="."/>
                                            </xsl:element>
                                       </Row>
                                  </xsl:for-each>
                             </Rowset>
                        </xsl:if>
                   </xsl:for-each>
              </Rowsets>
         </xsl:template>
    </xsl:stylesheet>
    Sam

  • Problems with xsl transformation

    Hi,
    I have an XSL to transform an XML to HTML code.
    I want my HTML to be ACCESSIBLE.
    All is working ok, but the <html> tag have two or three attributtes that make de code no ACCESSIBLE.
    This is a part of the XSL code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
         <xsl:output method="xhtml" version="1.0" encoding="UTF-8" indent="yes" standalone="no"/>
    <xsl:include href="barraSuperior.xsl"/>
         <xsl:include href="cabecera.xsl"/>
         <xsl:include href="menu.xsl"/>
         <xsl:include href="enllacosDestacats.xsl"/>
         <xsl:include href="contenido.xsl"/>
         <xsl:include href="barraBanners.xsl"/>
         <xsl:include href="pie.xsl"/>
         <xsl:variable name="homeWeb">http://172.16.67.119:8080/Biblioteques/xslt/V53CapSetmana</xsl:variable>
         <xsl:variable name="idioma"><xsl:value-of select="xmlData/config/idioma"/></xsl:variable>
         <xsl:variable name="literals" select="document(concat($homeWeb,'/traduccions/',$idioma,'.xml'))"/>
         <xsl:template match="/">
              <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$idioma}" lang="{$idioma}">
                   <head>
                        <title>
    <body>
                        <xsl:call-template name="barraSuperior"/>
                        <xsl:call-template name="cabecera"/>
                        <div id="wrapper">                         
                             <div id="columna0">
                                  <xsl:apply-templates select="xmlData/menuLateral/contingutVignette/contingut/llista"/>
                             </div>     
                             <xsl:call-template name="contenido"/>
                        </div>
                        <xsl:call-template name="pie"/>
                   </body>
              </html>
         </xsl:template>
    </xsl:stylesheet>
    This is a part of the HTML result:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="ca" lang="ca">
         <head>
              <title>B cap de setmana</title>
    </head>
    <body>
    </body>
    I want the <html> to be like this:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ca" lang="ca">

    Use the exclude-result-prefixes attribute in your xsl:stylesheet element.

  • CPO XSL Transform for CPSC Form data with Grid

    Does anyone have an XSL Transform worked out that conveniently parses the CPSC Form output from Service Link when it has a grid in it?
    For example the data from CPSC Service Link might look like:
    <root>
       <Common>
          <Action ClassID="">Some Action</Action>
          <RequisitionID>123</RequisitionID>
       </Common>
       <Attributes/>
       <FormData>
          <Dictionary.Field>Some Data</Dictionary.Field>
          <DictionaryWithGrid-1.Field1>somevalue</DictionaryWithGrid-1.Field1>
          <DictionaryWithGrid-1.Field2>someothervalue</DictionaryWithGrid-1.Field2>
          <DictionaryWithGrid-1.Field3>yetanothervalue</DictionaryWithGrid-1.Field3>
          <DictionaryWithGrid-2.Field1>somevalue2</DictionaryWithGrid-2.Field1>
          <DictionaryWithGrid-2.Field2>someothervalue2</DictionaryWithGrid-2.Field2>
          <DictionaryWithGrid-2.Field3>yetanothervalue2</DictionaryWithGrid-2.Field3>
       </FormData>
    </root>
    So the desired output would be
    <Row>
       <Field1>somevalue</Field1>
       <Field2>someothervalue</Field2>
       <Field3>yetanothervalue</Field3>
    </Row>
    <Row>
       <Field1>somevalue2</Field1>
       <Field2>someothervalue2</Field2>
       <Field3>yetanothervalue2</Field3>
    </Row>
    I'm having difficulty getting the right XSL select when the tag is something like 'DictionaryWithGrid-#.Field'.
    Thanks!

    That worked great, Svetlana!  Thank you very much for the help.
    I made some slight mods to make it even more portable and intuitive for XSL/XML beginners.
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:msxsl="urn:schemas-microsoft-com:xslt">
    <!-- Replace CHANGEME below with the name of the CPSC Form Dictionary to transform -->
    <xsl:variable name="Dictionary">CHANGEME</xsl:variable>
    <xsl:template match="root">
      <Table>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="1" />
          </xsl:call-template>
      </Table>
    </xsl:template>
      <xsl:template name="ProcessOne">
        <xsl:param name="pos" />
        <xsl:variable name="RowName" select="concat($Dictionary, '-', $pos)" />
        <xsl:if test="FormData/*[starts-with(name(), $RowName)] != ''">
          <Row>
            <xsl:for-each select="FormData/*[starts-with(name(), $RowName)]">
              <xsl:if test="starts-with(name(.), $RowName)">
                <xsl:variable name="FieldName" select="substring-after(name(.), '.')"/>
                <xsl:element name="{$FieldName}">
                  <xsl:value-of select="."/>
                </xsl:element>
              </xsl:if>
            </xsl:for-each>
          </Row>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="number($pos+1)" />
          </xsl:call-template>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>

  • ' Displays after XSL Transform

    I am converting Oracle XMLDB XMLSchema registered XML documents in an XMLTYPE table into HTML by using the database XSLT engine. The characters for & and quote(') are stored in the document as &amp; and &apos;. Unfortunately, after the transformation to HTML these characters display in a browser window (IE6) as &amp; and &apos; instead of as '&' and single quote('). This appears to be due to the fact that HTML does not recognise &amp; or &apos; but will correctly render &#38; and &#39; as '&' and single quote('). I would like to record these characters in my XML documents in XML DB as &#38; and &#39; so they display correctly when rendered to the web. Oracle's XML parser always seems to swap these for &amp; and &apos; whenever I do an XML document update.
    Can anyone tell me if there is another approach to getting & and single quote to display properly after an XSLT transformation to HTML?
    For reference sake our XML documents are stored in Oracle XMLDB (v9.2.0.5 on Solaris) with encode="ISO-8859-1" and we are doing the transformation in the database with the following code:
    CREATE OR REPLACE FUNCTION get_cu_xml(
    p_unitset_id IN NUMBER,
    p_year IN NUMBER)
    RETURN VARCHAR2
    IS
    CURSOR get_xml_cur(
    p_unitset_id NUMBER,
    p_year NUMBER)
    IS
    SELECT extract(VALUE(p),'/UnitSetYear')
    FROM cu_unit_set_years_xml p
    WHERE extractValue(VALUE(p),'/UnitSetYear/UnitSetID') = p_unitset_id
    AND extractValue(VALUE(p),'/UnitSetYear/Year') = p_year;
    xml_doc xmltype;
    xsl_clob CLOB;
    xml_clob CLOB;
    myParser dbms_xmlparser.Parser;
    indomdoc dbms_xmldom.domdocument;
    xsltdomdoc dbms_xmldom.domdocument;
    xsl dbms_xslprocessor.stylesheet;
    outdomdocf dbms_xmldom.domdocumentfragment;
    outnode dbms_xmldom.domnode;
    proc dbms_xslprocessor.processor;
    buf CLOB;
    BEGIN
    OPEN get_xml_cur(
    p_unitset_id,
    p_year);
    FETCH get_xml_cur INTO xml_doc;
    IF (get_xml_cur%FOUND) THEN
    xml_clob := xml_doc.getClobVal();
    xsl_clob := UriFactory.getUri('/home/cu/xsl/UMDetail.xslt').getXML().getClobVal();
    myParser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseBuffer(myParser, xml_clob);
    indomdoc := dbms_xmlparser.getDocument(myParser);
    dbms_xmlparser.parseBuffer(myParser, xsl_clob);
    xsltdomdoc := dbms_xmlparser.getDocument(myParser);
    xsl := dbms_xslprocessor.newstylesheet(xsltdomdoc, '');
    proc := dbms_xslprocessor.newProcessor;
    --apply stylesheet to DOM document
    outdomdocf := dbms_xslprocessor.processxsl(proc, xsl, indomdoc);
    outnode := dbms_xmldom.makenode(outdomdocf);
    -- PL/SQL DOM API for XMLType can be used here
    dbms_xmldom.writetoclob(outnode, buf);
    RETURN (buf);
    ELSE
    CLOSE get_xml_cur;
    RETURN (NULL);
    END IF;
    end get_cu_xml;

    Jinyu this is almost as if I need a disable-output-escaping="no" attribute for <xsl:for-each> but that appears not to be supported. The main section concerned in the xsl are the lines:
    <xsl:for-each select="n1:Desc">
    <xsl:apply-templates/>
    </xsl:for-each>
    The content in the Desc tag was edited with an XML editor which replaces quote characters with &apos;
    The full text of my xsl file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:n1="http://www.utas.edu.au/cu" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <xsl:output version="1.0" encoding="utf-8" omit-xml-declaration="no" indent="no" media-type="text/html"/>
         <xsl:template match="/">
              <html>
                   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
                   <head/>
                   <body>
                        <xsl:for-each select="n1:UnitSetDetails">
                             <h1 align="center">
                                  <xsl:for-each select="n1:UnitSetLabel">
                                       <xsl:apply-templates/>
                                  </xsl:for-each>&#160;<xsl:for-each select="n1:UnitSetTitle">
                                       <xsl:apply-templates/>
                                  </xsl:for-each>
                             </h1>
                             <xsl:if test="n1:UnitMembers/n1:UnitMember[1]/n1:FPTime != n1:UnitMembers/n1:UnitMember[2]/n1:FPTime">
                                  <h2 align="center">
                                       <xsl:for-each select="n1:UnitMembers">
                                            <xsl:for-each select="n1:UnitMember">
                                                 <xsl:for-each select="n1:UnitCode">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>(<xsl:for-each select="n1:FPTime">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>)&#160; </xsl:for-each>&#160;</xsl:for-each>
                                  </h2>
                             </xsl:if>
                             <p>
                                  <xsl:if test="string-length( n1:SpecialNote ) &gt; 0">
                                       <span style="font-weight:bold; ">SPECIAL NOTE:</span>&#160;<xsl:for-each select="n1:SpecialNote">
                                            <xsl:apply-templates/>
                                       </xsl:for-each>
                                  </xsl:if>
                             </p>
                             <p>
                                  <span style="font-weight:bold; ">OFFERINGS</span>
                                  <table bgcolor="#F3F3F3" border="1" cellpadding="5" cellspacing="0" width="500">
                                       <tbody>
                                            <tr>
                                                 <td width="535">
                                                      <xsl:if test="n1:Offered = &apos;N&apos;">Not Offered</xsl:if>
                                                      <xsl:if test="n1:Offered = &apos;Y&apos;">
                                                           <xsl:for-each select="n1:UnitMembers">
                                                                <table border="0" cellspacing="1">
                                                                     <thead>
                                                                          <tr bgcolor="silver">
                                                                               <td width="35">Unit</td>
                                                                               <td align="left" width="55">Sem 1</td>
                                                                               <td align="left" width="55">Sem 2</td>
                                                                               <td align="left" width="55">Full Yr</td>
                                                                               <td align="left" width="55">Spring</td>
                                                                               <td align="left" width="55">Summer</td>
                                                                               <td align="left" width="55">Winter</td>
                                                                          </tr>
                                                                     </thead>
                                                                     <tbody>
                                                                          <xsl:for-each select="n1:UnitMember">
                                                                               <tr>
                                                                                    <td width="35">
                                                                                         <xsl:for-each select="n1:UnitCode">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem1">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem2">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:SemF">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem5">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem3">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem4">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                               </tr>
                                                                          </xsl:for-each>
                                                                     </tbody>
                                                                </table>
                                                           </xsl:for-each>
    Offered in Courses: <xsl:for-each select="n1:OfferedInCourses">
                                                                <xsl:apply-templates select="n1:Course"/>
                                                           </xsl:for-each>
                                                      </xsl:if>
                                                 </td>
                                            </tr>
                                       </tbody>
                                  </table>
                             </p>
                             <p>
                                  <span style="font-weight:bold; ">DESCRIPTION</span>
                                  <xsl:for-each select="n1:Desc">
                                       <xsl:apply-templates/>
                                  </xsl:for-each>
                             </p>
                             <p>
                                  <span style="font-weight:bold; ">WEIGHT:</span>&#160;<xsl:for-each select="n1:UnitMembers">
                                       <xsl:for-each select="n1:UnitMember">
                                            <xsl:for-each select="n1:UnitCode">
                                                 <xsl:apply-templates/>
                                            </xsl:for-each>&#160;<xsl:for-each select="n1:DefaultWeight">(<xsl:apply-templates/>%)</xsl:for-each>&#160;&#160;&#160;&#160; </xsl:for-each>
                                  </xsl:for-each>
                             </p>
                             <xsl:if test="string-length( n1:Assess ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">ASSESSMENT: </span>
                                       <xsl:for-each select="n1:Assess">
                                            <xsl:apply-templates/>
                                       </xsl:for-each>
                                  </p>
                             </xsl:if>
                             <xsl:if test="string-length( n1:TeachPattern ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">TEACHING PATTERN: </span>
                                       <xsl:for-each select="n1:TeachPattern">
                                            <xsl:apply-templates/>
                                       </xsl:for-each>
                                  </p>
                             </xsl:if>
                             <xsl:if test="string-length( n1:UnitMembers/n1:UnitMember/n1:WebSup ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:WebDep ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:FullOn ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:ResSupTL ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:ResDepTL ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:VideoConf ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:FlexSched ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:WPLearn ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">FLEXIBLE &amp; ONLINE STUDY OPTIONS</span>
                                       <span style="font-weight:bold; ">Note:</span> Class attendance may still be required
                                       <xsl:for-each select="n1:UnitMembers">
                                            <xsl:for-each select="n1:UnitMember">
                                                 <xsl:for-each select="n1:UnitCode">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>
                                                 <xsl:if test="string-length( n1:WebSup ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Web supported - <xsl:for-each select="n1:WebSup">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    Online access to some part of this unit online is optional
    </xsl:if>
                                                 <xsl:if test="string-length( n1:WebDep ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Web dependent - <xsl:for-each select="n1:WebDep">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    Some parts of this unit will be taught online
    </xsl:if>
                                                 <xsl:if test="string-length( n1:FullOn ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Fully online - <xsl:for-each select="n1:FullOn">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    This unit is taught entirely online
    </xsl:if>
                                                 <xsl:if test="string-length( n1:ResSupTL ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Resource supported teaching &amp; learning - <xsl:for-each select="n1:ResSupTL">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    Additional resources are provided for your optional use; e.g. video taped lectures
    </xsl:if>
                                                 <xsl:if test="string-length( n1:ResDepTL ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Resource dependent teaching &amp; learning - <xsl:for-each select="n1:ResDepTL">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    Independent study with provided resources replaces face-to-face or other classes (e.g. lectures)
    </xsl:if>
                                                 <xsl:if test="string-length( n1:VideoConf ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Video conferencing - <xsl:for-each select="n1:VideoConf">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    A live video link between campuses is used for at least some teaching in this unit
    </xsl:if>
                                                 <xsl:if test="string-length( n1:FlexSched ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Flexible scheduling - <xsl:for-each select="n1:FlexSched">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    You can attend some classes out of normal teaching hours; e.g. weekend blocks, summer schools etc
    </xsl:if>
                                                 <xsl:if test="string-length( n1:WPLearning ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Workplace learning - <xsl:for-each select="n1:WPLearn">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    This unit involves study in the workplace
    </xsl:if>
                                            </xsl:for-each>
                                       </xsl:for-each>
                                       About Flexible Study Options
                                  </p>
                             </xsl:if>
                             <xsl:if test="count( /n1:UnitSetDetails/n1:Requisites/n1:Requisite ) &gt; 0">
                                  <p>
                                       <xsl:for-each select="n1:Requisites">
                                            <span style="font-weight:bold; ">REQUISITE INFO</span>
                                            <table border="0" cellpadding="3" cellspacing="0">
                                                 <tbody>
                                                      <xsl:for-each select="n1:Requisite">
                                                           <tr>
                                                                <td>
                                                                     <xsl:for-each select="n1:ReqType">
                                                                          <xsl:choose>
                                                                               <xsl:when test=".='PREREQ'">
                                                                                    <xsl:text>Prereq</xsl:text>
                                                                               </xsl:when>
                                                                               <xsl:when test=".='COREQ'">
                                                                                    <xsl:text>Coreq</xsl:text>
                                                                               </xsl:when>
                                                                               <xsl:when test=".='MEXCL'">
                                                                                    <xsl:text>M.Excl</xsl:text>
                                                                               </xsl:when>
                                                                          </xsl:choose>
                                                                     </xsl:for-each>
                                                                </td>
                                                                <td>
                                                                     <xsl:for-each select="n1:ReqText">
                                                                          <xsl:apply-templates/>
                                                                     </xsl:for-each>
                                                                </td>
                                                           </tr>
                                                      </xsl:for-each>
                                                 </tbody>
                                            </table>
                                       </xsl:for-each>
                                  </p>
                             </xsl:if>
                             <xsl:if test="string-length( n1:RequiredTexts/n1:RequiredText ) &gt; 0 or string-length( n1:RecommendedTexts/n1:RecommendedText ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">TEXTS</span>
                                       <xsl:if test="string-length( n1:RequiredTexts/n1:RequiredText ) &gt; 0">
                                            <xsl:for-each select="n1:RequiredTexts">
                                                 <span style="font-weight:bold; ">Required</span>
                                                 <xsl:for-each select="n1:RequiredText">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>
                                            </xsl:for-each>
                                       </xsl:if>
                                       <xsl:if test="string-length( n1:RecommendedTexts/n1:RecommendedText ) &gt; 0">
                                            <xsl:for-each select="n1:RecommendedTexts">
                                                 <span style="font-weight:bold; ">Recommended Texts</span>
                                                 <xsl:for-each select="n1:RecommendedText">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>
                                            </xsl:for-each>
                                       </xsl:if>
                                  </p>
                             </xsl:if>
                             <xsl:if test="string-length( n1:Staff ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">STAFF: </span>
                                       <xsl:for-each select="n1:Staff">
                                            <xsl:apply-templates/>
                                       </xsl:for-each>
                                  </p>
                             </xsl:if>
                        </xsl:for-each>
                   </body>
              </html>
         </xsl:template>
         <xsl:template match="n1:Bold">
              <span style="font-weight:bold; ">
                   <xsl:apply-templates/>
              </span>
         </xsl:template>
         <xsl:template match="n1:BulletList">
              <ul style="margin-bottom:0; margin-top:0; " start="1" type="disc">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ul>
         </xsl:template>
         <xsl:template match="n1:BulletedList">
              <ul style="margin-bottom:0; margin-top:0; " start="1" type="disc">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ul>
         </xsl:template>
         <xsl:template match="n1:Course">
         [<a>
                   <xsl:attribute name="href"><xsl:text disable-output-escaping="yes">/pls/portal/url/page/COURSE_UNIT/UTAS_COURSE_DETAIL?P_COURSE_CODE=</xsl:text><xsl:value-of select="."/></xsl:attribute>
                   <xsl:apply-templates/>
              </a>
              <xsl:text disable-output-escaping="yes">] </xsl:text>
         </xsl:template>
         <xsl:template match="n1:Italic">
              <span style="font-style:italic; ">
                   <xsl:apply-templates/>
              </span>
         </xsl:template>
         <xsl:template match="n1:ListBullet">
              <ul style="margin-bottom:0; margin-top:0; " start="1" type="disc">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ul>
         </xsl:template>
         <xsl:template match="n1:ListLetter">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="a">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:ListNumber">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="1">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:ListRoman">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="i">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:NumberedList">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="1">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:Unit">
              <xsl:if test="string-length(.) &gt; 0">
                   <a>
                        <xsl:attribute name="href"><xsl:text disable-output-escaping="yes">/pls/portal/url/page/COURSE_UNIT/UTAS_UNIT_DETAIL?P_UNIT_CODE=</xsl:text><xsl:value-of select="."/></xsl:attribute>
                        <xsl:apply-templates/>
                   </a>
              </xsl:if>
         </xsl:template>
         <xsl:template match="n1:ol">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="1">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:para">
              <p style="padding-bottom:0; padding-top:0; ">
                   <xsl:apply-templates/>
              </p>
         </xsl:template>
         <xsl:template match="n1:table">
              <xsl:apply-templates/>
         </xsl:template>
         <xsl:template match="n1:ul">
              <ul style="margin-bottom:0; margin-top:0; " start="1" type="disc">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ul>
         </xsl:template>
    </xsl:stylesheet>

  • ImportNode() does not import attribute values

    I want to import one part of xml document into another xml document. I use the Document.importNode() method to do this. Here's my code snippet:
    Document newdoc = db.newDocument();
    Node importedNode = newdoc.importNode(xmlnode,true);
    But as the result the xml part is copied into importedNode, but attribute values are empty. What do I do wrong? I'm really lost, so thanks for ANY help.

    Well, the importNode() method should do this. But while using Xerces (I must use this one (currently in 1.4.4 version), not any other parser) you'll find out there is a bug in this method. It could work for you (maybe), but for me it just removes all the attribute values. So I'm still looking for an answer.
    I wrote one very simple (not generic, which is enough for my case) method to just hack the behaviour, and I entered bug to Xerces bugzilla, but nobody cares ;O( for it. Sad, but true.

  • Modify New VO but not able to see Attribute Value.

    Hi ,
    I am facing one problems during my VO extend. I have done below step,
    1) Created new XXCustomVO based on exsiting CustomVO.Created new Attribute, modify SQL and mapped and gave new Name XXCustomInfoVO.
    2) Assign this new XXCustomVO to new filed with Attribute name.
    4) Copy XXCustomVO.xml and all class file from Desktop to Server in respecitve folder.
    5) Import Page regions which i have created New Item.
    6) Import with JPXImport.("Porject substitutions" )
    7) Now I run the page no errors found but not able to see new attribute Data.
    Then I checked "About Page" but everything is refected correctly only not able to see new attribute data.
    Can you please help me out. Is there any wrong thing i am doing or something is missing still.
    Thanks

    Hi ,
    Even exsiting attribute value alos not display. I mean I have 20 attribute in this exsiting VO and I have add one more XX attribute and same as XXVO but non of value is display out of 21 attibute.
    Even i have hard coded "1234" for this attribute but always return null.
    Where I have to foucs.
    thanks
    Raj
    Message was edited by:
    RajPatel

  • Is there a way to copy attributes from one composition to another?

    I'm using After Effects 7.0
    I'd like to copy the same Zoom attributes from one composition to 30 photographs.
    In Final Cut, you can copy attributes from one clip to another. Or from one still photo to another.
    Is there a way to do that in AE 7?
    Thanx
    Mike

    EDIT: I see you edited your question, so I am editing my reply.
    To copy the scale of a layer, open the main twirl of that layer and you'll see the Transform properties group. Open the twirl for that, and you'll see Anchor Point, Position, Scale, etc. Click on "Scale" and copy it (Edit > Copy, or Control+C on Windows/Command+C on Mac). Then select the other layers and just paste (Edit > Paste, or Control+C on Win/Command+V on Mac).
    Such a broad question
    Anytime you add a new item you imported to the timeline or composition panels, it becomes a new layer.
    Anytime you duplicate an existing layer (Edit > Duplicate), you get a new layer.
    Anytime you split a layer (Edit > Split) you get a new layer.
    Anytime you copy a whole layer (target the name in the timeline panel) and paste it, you get a new layer.
    You also create layers when you use the Shape tools, text tools, or create a new solid layer, etc.
    This list could go on and on, so instead, I invite you to read the After Effects Help section on Creating layers specifically, and the whole chapter on Layers and properties, in general. If anything isn't clear for you, then let us know.

Maybe you are looking for

  • How to get a top name for your iweb website on google?

    Hey everyone I've started a website on iweb. I was wondering how to get it so my website will have a good search result, first page, on google. I know my question isn't that descriptive but any help would help. Thanks Bevan James Eyles

  • Error (0xE800000A)

    I recently upgraded to iOS 6 in my Iphone 4. Also i upgraded Itunes to 11. Since that moment itunes deny to conect to my Iphone and i get the follow messsage: iTunes cannot conect to this iPhone. Unknown error (0xE800000A) Could someone help me on th

  • How to regain the search result

    Hi, In a BTF I am having a search screen and a BTF1. In the search screen I am using af:query and table component. I have put one button(View) at the toolbar of the table which will invoke the BTF1. Once query will be performed and result will be ret

  • Any wifi/3g Bidirectional sync ways instead of import/export documents ?

    Is there any way or any software for mac & ipad that will do bi-directional sync using 3G/Wi-Fi instead of importing/exporting for Excel  & Pages documents?

  • Strange problem when copying files to NAS

    Hello all. I have a strange problem when trying to copy files from my intel iMac to my Seagate NAS. I am copying files from my HD and when the file is nearly copyied i get an error message saying that the file can't be copied because it is already in