Problem in runing xalan( says: stylesheet requires attribute: version)

I have test.xml & test.xsl (listed bellow).When i go to transform it
by using xalan with the command line as:
E:\xmlExamples>java org.apache.xalan.xslt.Process -IN test.xml -XSL test.xsl -OUT test.html
I get the error:
file:///E:/xmlExamples/stocks.xsl; Line 2; Column 71;
file:///E:/xmlExamples/stocks.xsl; Line 2; Column 71; XSLT Error (javax.xml.transform.TransformerCon
figurationException): javax.xml.transform.TransformerException: javax.xml.transform.TransformerExcep
tion: stylesheet requires attribute: version
Please help me out..
//test.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="e:\xmlExamples\test.xsl" type="text/xsl">
<company>
          <employee><name>X</name></employee>
          <employee><name>Y</name></employee>
          <employee><name>Z</name></employee>
</company>
//test.xsl
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" version="1.0">
<xsl:template match="/">
<html>
<head>
<title>emp</title>
</head>
<body bgcolor="#ffffcc" text="#0000ff">
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="company">
<B>COMPANY</B>
<xsl:for-each select="emloyee">
     <i><xsl:value-of select="name"/></i>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

try this xsl:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="utf-8"/>
     <xsl:template match="/">
          <html>
               <head>
                    <title>emp</title>
               </head>
               <body bgcolor="#ffffcc" text="#0000ff">
                    <xsl:apply-templates/>
               </body>
          </html>
     </xsl:template>
     <xsl:template match="company">
          <B>COMPANY</B>
          <xsl:for-each select="emloyee">
               <i>
                    <xsl:value-of select="name"/>
               </i>
          </xsl:for-each>
     </xsl:template>
</xsl:stylesheet>

Similar Messages

  • Required attribute version missing from element xsl:stylesheet

    Tools:
    Jdeveloper : 10.1.3.3
    Error:
    Every time I add transform process activity and try to create mappings I am not able to save them.
    In source view I see this error "Required attribute version missing from element xsl:stylesheet".
    I cannot continue and do not understand how to proceed.
    Any ideas ?

    We have the same problem here from time to time. This has to be some kind of bug in JDeveloper. There is nothing wrong with our xsl files! But for some reason JDeveloper complains about the version attribute of xsl:stylesheet which in all the cases I've seen IS THERE!
    Sometimes restarting JDeveloper helps - sometimes not. I even ended up reinstalling JDeveloper a few times.
    I hoped this would be fixed in 10.1.3.3 (we use 10.1.3.2) but sadly it's not it seems.

  • Iphone 4S, recently updated to IOS 7.0.2 When I try to sync with my Mac window pops up saying iphone requires itunes version 11.1 or later. Disconnected, switched both off and back on, no change. Any ideas?

    I have an iphone 4S, recently updated to IOS 7.0.2. Tried syncing with my Mac but window pops up saying iphone requires itunes version 11.1 or later. Tried updateing itunes but it says it's up to date. Tried disconnecting, switching both phone and mac off and back on, no change. Any ideas?

    bristles wrote:
    ... the version I'm on is 10.5.8.
    If possible... you need to Upgrade to Snow Leopard = OS X 10.6.x  (which will Run iTunes Version 11)
    It is Not available as a download... It is a Paid Upgrade.
    Do this first...
    Check that your Mac meets the System Requirements for Snow Leopard...
    Snow Leopard Tech Specs
    http://support.apple.com/kb/SP575
    If so... Purchase a Snow Leopard Install Disc...
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Other countries...
    http://support.apple.com/kb/HE57
    After the Successful Install, run Software Update to get the latest updates for Snow Leopard and iTunes.
    Be sure to make a Backup of your Current System Before Upgrading...
    NOTE:
    You should also consider more RAM... Get the Maximum you can for your Mac...
    It is important to get the Correct and Matching RAM
    See Here  >  OWC RAM  >  http://www.macsales.com
    The above site also has videos on how to Install RAM should you need it...

  • Problems using my new iPod classic, says it requires iTunes version 10.7!

    I've just bought an iPod classic to store my music collection, but it says it can't be used because it requires iTunes version 10.7 or later. (I'm currently running iTunes version 10.6.3) I can't download iTunes version 10.7 because my iMac is running on OS X version 10.5.8. I hadn't anticpated this problem as the iPod classic is a relatively old model, not updated since 2009. I didn't really want to buy new operating software for my Mac as well. Any ideas what to do please?

    Whatever you do, DO NOT update to iTune 11.  It won't work with iPod Classic.

  • I am trying to sync my iphoto events with my iphone, but when i do, it says the required file cannot be found.. how do i solve this problem?

    i am trying to sync my iphoto events with my iphone, but when i do, it says the required file cannot be found.. how do i solve this problem?

    Try erasing the iPod photo cache.
    http://support.apple.com/kb/ts1314

  • When I am downloading a free application (foursquare) in the App Store, it came up with a message saying Verification Required which means I need to pay for it. Can anyone tell me how to fix this problem?

    I am currently using iPhone 3GS and when I am going to download foursquare which is a FREE application in the App Store, it came up with a message saying Verification Required which means I need to pay for it. Can anyone tell me how to solve the problem? For further informations, I am currently using Windows running Vista. Special thanks to those who replied.

    Your iTunes account sounds like it does not have a credit card or payment attached to it. Even free apps require that you have entered payment information even though you won't be charged for the app.

  • Good morning friends, I have a problem with my iphone 4s since I get a screen that just light it says "Activation Required" restored it and not corrected, I bought my factory unlocked iphone, how I can fix this, I had installed the version 6.0 as develope

    Good morning friends, I have a problem with my iphone 4s since I get a screen that just light it says "Activation Required" restored it and not corrected, I bought my factory unlocked iphone, how I can fix this, I had installed the version 6.0 as developer to

    If you have a beta copy of iOS6
    1. You are a developer and will know how to transition from beta
        to release version and to use the Develpoer forum
    2. You have a pirate copy of the beta and no-one on this Apple hosted Forum can help you
         try Google

  • Problem with "required" attribute in inputBox

    Hi ,
    I have a requirement where a input field needs to be populated using lookup.
    I am using commandButton to populate the input field.Since I dont want user to type anything in this input Field , I have made this field readOnly.
    This is a mandatory field so I have put required attribute true.But on the click of submit button this validation does not trigger.If I make remove readOnly attribute or make it false, the validation triggers.Here is the snippet for this part.
    <afh:rowLayout>
    <afh:cellFormat halign="right" >
    <af:commandButton id="lookupFrom_buttonId" text="From Mfg:"
    action="dialog:company.selectBox"
    immediate="true" windowWidth="390" windowHeight="550"
    launchListener="#{mfgReassignBean.addParameter}"
    returnListener="#{mfgReassignBean.returnFromMfr}"
    partialSubmit="true" useWindow="true"
    >
    </af:commandButton>
    </afh:cellFormat>
    <af:inputText
    partialTriggers="lookupFrom_buttonId"
    readOnly="true"
    required="true"
    binding="#{mfgReassignBean.fromDeveloperInput}"
    value="#{mfgReassignBean.assignmentRule.fromMfgName}"
    />
    </afh:rowLayout>
    has anybody faced such situation...any suggestions ?
    Thanks!!

    disabled and readonly fields are discarded from the JSF stack and thus not validated! Options are: make readonly field not readonly on form submit or copy readonly field to hidden field (both involve client side javascript)

  • Problem with the "required" attribute in input_text (in 1.0 beta)

    Suppose you wanted to display a more meaningfull message instead of the default "Validation Error: Value is required", e.g. "Please enter your e-mail address". Looks like the only way to do this is to write a custom validator. However, if required="true" in the input_text, you will get the default message, if you don't set "required", your custom validator is not called at all.
    This is something that needs to be addressed, because it will be very common to want to have meaningfull error messages (I can't imagine somebody will approve a commercial application which will display messages like "Validation Error: Value is required").
    As a workaround, I tried setting an error message in the action handler, but I can't seem to get the component from within the bean code. In the action method I have:
    FacesContext context = FacesContext.getCurrentInstance();
    UIInput component = (UIInput) context.getViewRoot().findComponent("testInput");where testInput is the id of the input_text - findComponent() returns null.
    P.S. Btw, I noticed that now in 1.0 the ids look like this id0:testInput which is a really bad choice if you have to write any JavaScript handler, e.g. onClick(), since id0:testInput is not a valid JavaScript variable name. You can still find it by going through all the document.forms[0].elements[n].name and set it up that way, but it's a hassle.

    Thanks,
    findComponent("formName:inputName")worked fine.
    But still, I think that if you have a custom validator
    it should be called regardless of whether there is
    something in the input or not (or maybe bypass the
    default validation if "required" attribute is set, but
    there is a custom validator), because that's the only
    way you can change the default "Value required"
    message using a validator. If you have to check it in
    the action method, you might as well do the whole
    validation there, which makes validators pointless.The expert group considered this decision carefully, and concluded that the current behavior was the best -- if there is no input data, skip any specified validations -- because of the likelihood for things like null pointer exceptons in validators that are not prepared for this scenario.
    One approach to dealing with this if you would prefer different behavior for your own components is to subclass UIInput and override the validate() method to do something different.
    Craig

  • Required attribute does not work with any data type other than String

    sir,
    I am a new to JSF. My problem is that I have used an integer type data in my page which is taking its value from a bean.But in jsf code I have used the required attribute for the <h:inputText> but if I leave the text box empty it is not showing the validation error which it show show. Another problem is that the page is also not navigating to the next page.
    The code is
    <h:inputText value="#{UserBean.age}" required="true"/>
    where age is of integer type

    Well. The fact that it is not jumping to the next view is "works as required". The assumption is, that once you say a field is required, it could be that the application CANNOT function without that value. Therefor the initial view is redisplayed until all required values are entered.
    IF you need a different behaviour, then the OptionalValidator-package which is currently in development state, is the way to go. It allows to specify different validating strategies for different links on a view (no validation, soft validation (== allow to go on, but produce warning messages), hard validation (== the way JSF works right now)). The problem is that with JSF 1.1 it is quite difficult to implement this behaviour. For simple validators (no parameters) it is working, but for complex validators (requiring parameters) not yet. For more info: http://wiki.apache.org/myfaces/OptionalValidationFramework
    No comment on the String-only behaviour, as I have not yet tested/observed that problem...
    hth
    Alexander

  • Using value binding expressions to set 'required' attribute

    I am trying to use a value binding expression to determine whether the value of various input control's is required or not according to where they are used and not having much luck. I wonder if anyone can shed some light on this...
    The following expression works: <h:inputText id="name" required="#{true}"/> whereas <c:set var="required" value="true" scope="request"/>
    <h:inputText id="name" required="#{required}"/> does not, even though the expression evaluates to true! I have tried numerous variations (requestScope.required, required == true, required ? true : false, etc.) to no avail. Interestingly, #{1 == 1} or binding to a backing bean method works, but as soon as you add a request variable it breaks.
    Am I doing something wrong, is this something that JSF doesn't allow, or just a bug in the RI? Note that I don't want to vary this flag between multiple submissions of the same form, I am just trying to reuse the same JSP include to generate form controls for required and optional data on different forms to avoid a whole lot of cutting any pasting.
    Any pointers gratefully received.
    -- Keith Wilson

    I had something like this happen, and here's what I concluded the problem was. Perhaps your problem is similar.
    In the first non-working example you show a request-scope variable being set in the JSP page, and then use that to set the "required" attribute. But consider what happens when you submit the form. There is no longer any request-scope variable set because we have a new request and we don't go through the JSP page! (Not before validation is checked, anyhow).
    So basically I concluded that the variable had to be in (say) session scope for it to work as you would like.

  • Error when using a condition for required attribute

    Hi
    I have a requirement to validate the mandatory fields only when the submit button is pressed....if some other button is pressed or some how the form is submitted the validations should not be performed....
    I have used required="#{MyBB.somecondition}" for all the mandatory fields...the method that is being called for doing the condition check is given below:
    public boolean isSomeCondition() {
        // assumes submitButton is a component binding 
        FacesContext fc = FacesContext.getCurrentInstance();
        Map reqParams = fc.getExternalContext().getRequestParameterMap();
        return reqParams.containsKey(submitButton.getClientId());
      }It is same that is given at the following location
    http://wiki.apache.org/myfaces/How_The_Immediate_Attribute_Works ---Soln 3
    But the problem is if I am submitting the form using Javascript from another page(page is a popup that is opened inside the current window), this condition doesnt work and it gives me an error saying "Check some field for its value"
    Please help me sort out this problem
    Thanks

    I think the problem is not clear....my mistake
    I try to be more elaborate on this....
    I open up a popup page from my main window....Here I perform a search(lets say there is a requirement for finding the Country and pincode for a particular city that the user enters)
    Now when I select the particular row in the datatable and click the submit button...... I want the selected values to be filled inside the parent window.....
    I want to bring to your notice that the button that is clicked is in the popup page...not in the parent window.....
    So you see that when that button in popup is clicked i am submiting the form of the parent window and during that time I dont want the validation to occur..... To submit the form of the parent window I use the Javascript like this : window.opener.document.forms[0].submit();Also one more thing that I want to mention is that the method that is used for specifying the condition for required attribute for mandatory fields in the parent window works fine for any button that i click inside my parent window......
    What I mean by this is lets say I have a button to add a dynamic row into my parent page then also I have to submit the form but during that time validation should not occur and it works fine.
    So now I think its clear that the Javascript is being invoked from another page which is submitting the parent window.....
    Then you're doing something wrong. Invoking the wrong button maybe? So please enlighten me where i am wrong and how possibly would I know which button I am invoking??

  • My iTunes doesn't sync ALL of my music to my iPod, saying "the required disc cannot be found"

    When I sync my iPod, only about half of my music syncs and a message comes up saying "the required disc cannot be found"
    Please help me!!!
    Thankyou so so much

    Deleting the iPod Photo Cache folder usually resolves the problem.  For its location see:
    iTunes: Understanding the iPod Photo Cache folder

  • Automatic Generation of classes with required attribute names

    Hi ,
    I am new to XML technologies ...I am having a problem in deciding whether I
    should use JAXB or Castor for data binding.
    The problem is the attributes I am to use are named differently as that found in
    the DTD.I have creted my own classes using the required attribute names and the
    n mapped them using the Castor mapping with the attributes.
    I was wondering how should I achieve --"automatic generation of classes" with th
    e specified attribute names?
    I understand that JAXB can be used to automatically generate classes ,but this
    uses the same default names as that of the XML file ..is there a way of forcing
    JAXB to generate classes that use my name attributes rather than that of the XM
    L dtd
    If I use Castor ..is there a way to do the same.Generate Classes with the specif
    id attributes

    Hi ,
    I am new to XML technologies ...I am having a problem in deciding whether I
    should use JAXB or Castor for data binding.
    The problem is the attributes I am to use are named differently as that found in
    the DTD.I have creted my own classes using the required attribute names and the
    n mapped them using the Castor mapping with the attributes.
    I was wondering how should I achieve --"automatic generation of classes" with th
    e specified attribute names?
    I understand that JAXB can be used to automatically generate classes ,but this
    uses the same default names as that of the XML file ..is there a way of forcing
    JAXB to generate classes that use my name attributes rather than that of the XM
    L dtd
    If I use Castor ..is there a way to do the same.Generate Classes with the specif
    id attributes

  • I have a laptop using OSX 10.5.8, iTunes v. 10.6.3 and Quicktime 7.7.  iTunes will not open.  It says it requires QuickTime 7.5.5 or later.  I've tried reinstalling each of them.  No success.  Don't know what to try next.

    I have a laptop using OSX 10.5.8, iTunes v. 10.6.3 and Quicktime 7.7.  iTunes will not open.  It says it requires QuickTime 7.5.5 or later.  I've tried reinstalling each of them.  No success.  Don't know what to try next.

    QuickTime 7.5.5 for Leopard - http://support.apple.com/kb/DL27
    QuickTime 7.7 for Leopard - http://support.apple.com/kb/dl761
    = New version of Quicktime installed but application reports it needs to have that version installed =
    Open Application > Utilities > System Profiler and check the Quicktime version in Frameworks vs. the version in Applications.  One person had re-installed their operating system.  It had kept the newer Player application but had reverted to an earlier version of the underlying support framework files which many applications utilize.  Re-installing Quicktime 7.7 took care of the problem.  Do this manually, not with Software Update.
    Installation get stuck at "configuring installation" - https://discussions.apple.com/thread/2592979?threadID=2592979  - uninstall Quicktime before installing.

Maybe you are looking for

  • IPhone - Problems Syncing with iTunes

    Hi, Can anyone help with a an iPhone syncing issue: - I recently upgraded to iTunes 9.0.1 and my 3GS (OS3.1) will no longer sync smoothly with iTunes. On connection: - iPhone shows up in iTunes Devices list - iTunes displays the message "An iPhone ha

  • Centering reduced sized pdfs in Preview?

    I have a pdf where the margins are too small and get cut off while printing. However, when I hit the "Scale" button on the Print menu in Preview it shoves it to a corner and the margins are still cut off. Is there a way to CENTER the reduced pdf file

  • Help w/10g-XE Install on Ubuntu

    Hello world, I have a (new to me) Ubuntu OS on which I am trying to make Oracle 10G-XE behave. I have searched many threads here and elsewhere on the web, but still cannot find an answer to the problems I am encountering. I have d/l'ed the 10g-XE deb

  • SLA and traffic light in CRM_DNO_MONITOR

    Dear Service Desk gurus. 1)In CRM_DNO_MONITOR where are traffic light and corresponding column "Valid to". How does the traffic color and "Valid to" date are calculated? Is it customizable and connect to message Priority? 2) When SLA is configured fo

  • Does Digital Editions support PDF Portfolios?

    I guess the answer is "no" but does Adobe Digital Editions offer any support for PDF Portfolios?