Burks, J.,
delivered the opinion of the court.
The plaintiff sued to recover damages for the death of her intestate, occasioned, as she claims, by the wrongful act or neglect of the defendant. The defendant demurred to the evidence, and the trial court sustained the demurrer and *396gave judgment for the defendant. To that judgment, this writ of error was awarded.
The declaration alleges that the defendant was engaged in interstate and intrastate commerce, but it is not clear from the declaration as to whether or not the plaintiff's' intestate was engaged in the one or the other at the time of the injury which resulted in his death. At the calling of the case for hearing, the defendant moved the court to require the plaintiff to elect whether she would proceed under the Federal or State statute on the subject, and the record states, “and thereupon the plaintiff, not objecting to said motion, elected to have her declaration taken as stating a case under, and to try the case according to, the statutes and laws of Virginia and not under the acts of Congress of the United States relative to the liability of common carriers engaged in interstate commerce and the court directed the allegations in the declaration as to the fact of the defendant being a common carrier engaged in interstate commerce, as well as intrastate commerce, to be disregarded as surplusage.”
[1-5] The defendant had no right to make any such demand. It had the right to require the plaintiff to state the facts in such a way as that the court could apply the apb propriate statute. St. Louis, etc., R. Co. v. Seale, 229 U. S. 156, 33 Sup. Ct. 651, 57 L. Ed. 1129, Ann. Cas. 1914 C, 156. It is never necessary to' plead any matter of law of which the court will take judicial notice. It is the function of the pleading to state facts and not law. Our courts take judicial notice of the public acts of Congress as well as those of the State, and will apply each as appropriate. Wherever the act of Congress is applicable it is exclusive, but if not applicable and the State statute is, the latter will be applied. Vickery v. New London, etc., R. Co., 87 Conn. 634, 89 Atl. 277, 279; Second Employers’ Liability. Act, 223 U. S. 1, 32 Sup. Ct. 169, 56 L. Ed. 327, 38 L. R. A. (N. S.) 44. No case' *397can arise where both statutes are applicable. Troxell v. Delaware, etc., R. Co., 227 U. S. 434, 33 Sup. Ct. 274, 57 L. Ed. 586. The trial court, however, clearly had jurisdiction, under the Virginia .statute, if the injury was Inflicted upon the plaintiff while engaged in intrastate commerce, and the Federal statute also gave it jurisdiction if the plaintiff’s intestate was, at the time of the injury, engaged in interstate commerce, so that whether he was engaged in intrastate commerce or interstate commerce, the State court had jurisdiction. It was not necessary to mention in the declaration under which of the .acts the plaintiff sued. It was sufficient if the facts alleged brought the cause of action within the terms of either statute. Vickery v. New London, etc., R. Co., supra; Missouri, etc., R. Co. v. Wulf, 226 U. S. 570, 33 Sup. Ct. 135, 57 L. Ed. 355, Ann. Cas. 1914 B, 134. It- is often extremely difficult to determine whether the injured servant was engaged in interstate commerce or not, and the advantage of suing in the State court is that that court has jurisdiction under both acts, and if the necessary facts are stated, jurisdiction will be maintained under the appropriate statute and the residue of the declaration, if necessary, will be treated as surplusage.
We do not wish to be understood as passing at present upon any question except that the defendant had no right to make the demand aforesaid of the plaintiff. Whether the injury complained of arose under the Federal statute or the State statute, and whether the declaration was sufficient under the Federal statute, and other questions need not be considered, as we are of opinion that the plaintiff was not entitled to recover under either statute.
After the plaintiff elected to proceed under the State statute no further question was made in the progress of the case as to which of the two statutes was applicable, nor was there any further suggestion that, under the facts of the case, the act of Congress was exclusive. Our further *398consideration of the points raised has assumed that the injury arose under the State statute as seemed to be conceded by the defendant.
The plaintiff’s intestate was employed by the defendant, at the time of his death, as an inspector and repairer of engines and cars brought into its yards at South Richmond, Va. He had been in the employment of the defendant company for fifteen years, and had worked in the capacity of repairer for ten or eleven years. He was fifty years of age,' a man of experience in his work, familiar with the tracks in the yard on which he was killed and of their, use, thoroughly acquainted with the methods of the work in the yard, and, as stated in the opinion of the learned trial judge, the conclusion is irresistible that “he was acquainted with the blue flag rule of the company, and was accustomed to act under it for his protection.” There were a number of tracks on the yard, used chiefly for holding cars until they could be properly distributed and moved to other places to make up trains or to be otherwise disposed of. There were also two tracks, one long and the other short, designated as engine tracks, for holding engines, and one track known as a repair track, under which there was a pit, which was used for heavy repairs to engines. All of these tracks were connected with another track called the “ladder track.” There were two hostlers on the yard in the daytime, and two at night. The dinner hour for the yard crews was from 11:30 to 12:30, at which time they turned their engines over to the hostler. The hostler cleans out the ash pan, coals and waters the engine, and if any repairs, are needed he places it in any place where he is requested or directed to place it; but if no such, request or direction is given, he places it wherever he chooses. He chocks it, and leaves it for the crew to take charge of after dinner. If- only light repairs are to be made, and no direction or request is given as to the location, the hostler uses his own judgment as to where *399to place it, as such repairs are made “most anywhere -around.”
[6] On Sunday, August 29, 1915, the crew in charge of yard engine No. 188 stopped for dinner about 12 o’clock -and left the engine at the water column, near the roundhouse, and the hostler took charge of it, cleaned the ash pan, coaled and watered it, and then backed it in the north •end of track No. 13, put a chock under it and left it. Six or seven cars were then parked on track No. 13, at the rear •of the engine. The engineer went to the roundhouse to eat .his dinner and, when about half through, the intestate came in, and a friendly conversation ensued, during which the intestate asked the engineer if there was anything he wanted •done, and the engineer testifies “I told him no, it wasn’t anything to do with the engine; it was alright except the lining of the air hose; it was loose, but the hose was not bursted, and I hadn’t made a report. He says, ‘Reckon I better put one on, hadn’t I?’ I says, ‘Use your own pleasure about it, Mr. Shu., I haven’t reported.’ He turned around and went right off from me. I didn’t know whether he had gone to put the hose on or not. He didn’t come back into the roundhouse any more.” The work to be done consisted of the removal of the old air hose and the attachment -of the new, which would have required about five minutes time. The intestate got the new hose and his tools and went to track No. 13 to make the needed repairs. He used no blue flag to protect him while doing the work. He had about completed the job, when the cut of cars next to the tender on which he was placing the new hose was struck by cars pushed in by an engine at the south end of track No. 18, and he was pinioned between the drawheads of one •of the cars and of the tender, causing the injury which resulted in his death. The testimony shows that the cars were not pushed in violently, but at the rate of about ten miles an hour, and that the stop signal was given and obeyed *400just as the cars being pushed in on No. 13 track coupled to the cars standing on the track. The space between the cut of cars on track No. 13 and the tender of engine 188 was about five or six feet. Rule No. 26 of the defendant company is as follows: “A blue flag by day and a blue light by night, displayed at one or both ends of an engine, car or train, indicates that workmen are under or about it, and, thus protected, it must not be coupled to or moved. Workmen will display the blue signals and the same workmen are alone authorized to remove them. Other cars' must not be placed on the same track so as to intercept the view of the blue signal without first notifying the workmen.” S,ome question was made in the argument as to the proper place at which the blue flag should have been placed to have protected the intestate from collision with the cars to the south of engine 188 on which he was at work. It was insisted, that under .a proper construction of Rule 26, it should have been placed at the south end of the tender on which he was at work, but that it would have been wholly unavailing if placed there, as the view of it would have been cut off by the cut of cars on the track, and hence he was excused from the use of the blue flag altogether. We cannot accede to this, but oh the contrary concur with the learned judge of the trial court, that the flag should have been placed at the south end of the cut of cars that was south of the tender. The engine was headed north, and back of it was the cut of six or seven cars. In order to protect himself from entries at the south end of track No. 13 he should have placed his flag on the south end of the car farthest south on that track from his place of work. The rule itself declares that “other cars must not be placed on the same track so as to intercept the view of the blue flag,” and the fair, if not necessary, inference is that if cars are already on the track which would intercept the view, the flag must be so placed that the view of it will not be intercepted. This is the fair and *401reasonable interpretation of the rule, and accords with the. practical interpretation thereof as testified to by the yardmaster and engineer in this case.
[7] The question of contributory negligence was argued at length before us, and also the effect of the recent statute of this State relating to contributory negligence in cases of this kind, but in our view of the case no'question of contributory negligence is involved, as that question can only arise after the negligence of the defendant has been first established. Until the negligence of the defendant has been established, there is nothing to which negligence on the part of. the plaintiff can contribute. It is essential, therefore, first to establish the negligence of the defendant. In the case at bar we are of opinion that negligence on the part of the defendant has not been established; that the failure of the plaintiff’s intestate to put up the blue flag for his protection was the sole proximate cause of his unfortunate death. These flags were provided in great abundance and at a most accessible place, but were not used by the intestate. No one knew that engine 188 was to be repaired at this time — it was not placed in position for that purpose— and no one knew or was chargeable with knowledge of the fact that the plaintiff’s intestate was engaged in making repairs thereon. He gave no information of his purpose to any one operating on the yard, and failed to adopt the means furnished by the company for his protection. He took his chances .and lost. He assumed the risk. It would be a vain thing to require the master to make and publish rules for the safety of his servants if the latter may violate them with impunity. It is as imperative that the servant should obey the rules as it is that the master should make and publish them. Neither can violate his duty in this regard without suffering the consequences. Norfolk & W. R. Co. v. Cofer, 114 Va. 434, 76 S. E. 909: Ches. & O. R. Co. v. Parker’s Adm’r, 116 Va. 368, 82 S. E. 183; Va. I. C. & *402C. Co. v. Asbury’s Adm’r, 117 Va. 683, 86 S. E. 148, and cases cited.
[8, 9] It appears from the evidence that “light repairs” were often made at different places in the yard, sometimes with and sometimes without the use of the blue flag, and it is argued from this that Rule 26 was abandoned, but there is no other evidence of an intention on the part of the company to relax the rule. Indeed, although the deceased was an experienced workman and familiar with the dangers to which he was exposed, the roundhouse foreman “called his attention to the blue flags and told him to be particular about the -blue flags and always use them.” There was certainly no abandonment of the rule so far as he was concerned. Rules made for the protection of servants in dangerous employments and with which they are entirely familiar will not be held to have been abrogated or abandoned unless that conclusion is plainly warranted by the evidence and necessary for the protection of the servant. Compare Southern R. Co. v. Johnson’s Adm’x, 111 Va. 499, 69 S. E. 323, Ann. Cas. 1912 A, 81.
In view of our conclusions that the- failure of the plaintiff’s intestate to put up the blue flags at proper places was the sole proximate cause of his death, it is unnecessary to consider other questions discussed in the oral arguments and in the briefs. For the reasons hereinbefore stated, the judgment of the Law and Equity Court of the city of Richmond will be affirmed.
Affirmed.